Math
Availability
Flash Player 5.
Description
The Math class is a top-level class whose methods and properties you can use without using a constructor.
You can use the methods and properties of this class to access and control mathematical constants and functions. All of the properties and methods of the Math class are static, and must be called using the syntax Math.method(parameter) or Math.constant. In ActionScript, constants are defined with the maximum precision of double-precision IEEE-754 floating-point numbers.
Several of the Math class methods take the radian of an angle as an parameter. You can use the equation below to calculate radian values, or simply pass the equation (entering a value for degrees) for the radian parameter.
To calculate a radian value, use this formula:
radian = Math.PI/180 * degree
Methods
abs acos asin atan atan2 ceil cos exp floor log max min pow random round sin sqrt tan
Properties
E LN2 LOG2E LOG10E LN10 PI SQRT1_2 SQRT2