Provides basic mathematical methods.
static public function toRadian(angle:Number):Number
Converts passed-in angle angle in radian.
angle | Angle in degree |
Radian convertion
static public function toDegre(angle:Number):Number
Converts passed-in angle angle in degree.
angle | Angle in radian |
Radian convertion
static public function round(value:Number, digits:Number):NumberRound passed number with passed precision.
value | Value to round |
digits | Round precision |
Rounde value of value with digits precision
static public function random(firstvalue:Number, secondvalue:Number, rounded:Boolean):Number
Returns random number between firstvalue and secondvalue value.
Arguments are automaticcaly re-order.
firstvalue | First interval limit |
secondvalue | Second interval limit |
rounded | Indicates if result must be round or not |
Random number in firstvalue and secondvalue interval
static public function square(value:Number):Number
Returns square value of passed-in value value.
value | Number |
Square value of value
static public function inverse(value:Number):Number
Returns inverse of passed-in value value
value | Number |
Inverse of value or '0' if value == 0
static public function sum(array:Array):Number
Calculates sum of elements passed in array instance.
array | Values array |
Number