Name

Number.POSITIVE_INFINITY Property — constant representing any number greater than Number.MAX_VALUE

Availability

Flash 5

Synopsis

Number.POSITIVE_INFINITY

Access

Read-only

Description

The POSITIVE_INFINITY property stores a special numeric value used to represent values greater than Number.MAX_VALUE (the largest number representable in ActionScript). This is known as an overflow condition and is usually caused by some sort of mathematical error.

Number.POSITIVE_INFINITY is normally used in its more convenient global property form, Infinity.

Example

if (score == Number.POSITIVE_INFINITY) {
  trace ("You've achieved the highest possible score.");
}

See Also

Infinity, isFinite( ), Number.MAX_VALUE; 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.