4.0.
Introduction
Although
numbers aren't always in the
spotlight, don't overlook their power and importance in your code.
Numbers come in all shapes and sizesfrom binary to decimal to
hexadecimal. Each type of representation has its own particular
niche in which it is most valuable. For example, hexadecimal numbers are often used to
represent RGB color values
because they make it easy to discern each of the three color
components. (See Recipe
4.2 to learn how to convert between different number
bases.)
Closely related to numbers is the subject of
mathematics. Without mathematical operations, your Flash movies
would be rather dull. Simple operations such as addition and
subtraction are essential to even the most basic ActionScript
applications, and more advanced math, such as random number
generation and trigonometric calculations, is equally essential to
advanced applications.
ActionScript 3.0 has three basic numeric types:
number, int, and
uint. number is for any
floating-point numbers, whereas int and uint are for
integers (whole numbers). The distinction between int and
uint is that int is the set of negative and
non-negative integers, while uint is the set of non-negative
integers (unsigned integers).
|