
Infinity Global Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
548
|
ActionScript Language Reference
Infinity Global Property
a constant representing an infinite number
Flash 5
read-only
Infinity
Description
A number that exceeds the maximum allowed numeric value in ActionScript is represented
by the numeric constant
Infinity (although incalculable numbers are represented by NaN).
The largest value allowed in ActionScript is represented by
Number.MAX_VALUE, which
equates to 1.79769313486231e+308. Exceeding the largest allowed number in Action-
Script is known as an overflow condition and is typically caused by a mathematical error.
Example
The result of a calculation that exceeds the largest allowed number is Infinity. For
example:
Number.MAX_VALUE * 2; // Yields Infinity
Infinity also results when dividing a positive number by zero:
1000 / 0; // Yields Infinity
Usage
Infinity is shorthand for Number.POSITIVE_INFINITY.
See Also
–Infinity, isFinite(), NaN, Number.POSITIVE_INFINITY; “Special Values of the Number
Datatype” in Chapter 4
-Infinity Global Property
a constant representing an infinitely negative number
Flash 5
read-only
–Infinity
Description
A number that exceeds the allowed negative numeric value in ActionScript is represented
by the numeric constant
–Infinity (although incalculable numbers are represented by NaN).
The smallest negative ...