Flash CS3 Documentation |
|||
| Flash Lite 2.x ActionScript Language Reference > ActionScript classes > Number > POSITIVE_INFINITY (Number.POSITIVE_INFINITY property) | |||
public static POSITIVE_INFINITY : Number
Specifies the IEEE-754 value representing positive infinity. The value of this property is the same as that of the constant Infinity.
Positive infinity is a special numeric value that is returned when a mathematical operation or function returns a value larger than can be represented.
This example compares the result of dividing the following values.
var posResult:Number = 1/0;
if (posResult == Number.POSITIVE_INFINITY) {
trace("posResult = "+posResult); // output: posResult = Infinity
}
var negResult:Number = -1/0;
if (negResult == Number.NEGATIVE_INFINITY) {
trace("negResult = "+negResult); // output: negResult = -Infinity
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00005382.html