Name
-Infinity Global Property — a constant representing an infinitely negative number
Availability
Flash 5
Synopsis
-Infinity
Access
Read-only
Description
Any number in ActionScript that exceeds the allowed
negative numeric range is represented by the
numeric constant -Infinity
. The smallest negative
value (the one with the largest absolute value) allowed in
ActionScript is -Number.MAX_VALUE
, which is
equivalent to -1.7976931348623157e+308.
Example
The result of a calculation that is smaller than (i.e., more negative
than) the smallest allowed negative number is
-Infinity
. For example:
-Number.MAX_VALUE * 2; // Yields -Infinity
-Infinity
also results when dividing a negative
number by zero:
-1000 / 0; // yields -Infinity
Usage
-Infinity
is shorthand for
Number.NEGATIVE_INFINITY
.
See Also
Infinity
,
Number.NEGATIVE_INFINITY
; Section 4.3.3 in Chapter 4
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.