Module monkey.math

Информация

The math module provides math related constants and functions.

Функции

Function ACos:Float ( x:Float )


Returns the arc cosine of x, in degrees.

Function ACosr:Float ( x:Float )


Returns the arc cosine of x, in radians.

Function ASin:Float ( x:Float )


Returns the arc sine of x, in degrees.

Function ASinr:Float ( x:Float )


Returns the arc sine of x, in radians.

Function ATan:Float ( x:Float )


Returns the arc tangent of x, in degrees.

Function ATan2:Float ( x:Float, y:Float )


Returns the arc tangent of x / y, in degrees.

The function uses the signs of x and y to compute the correct quadrant for the result.

Function ATan2r:Float ( x:Float, y:Float )


Returns the arc tangent of x / y, in radians.

The function uses the signs of x and y to compute the correct quadrant for the result.

Function ATanr:Float ( x:Float )


Returns the arc tangent of x, in radians.

Function Abs:Int ( x:Int )


Returns the absolute value of x, that is, +x if x>=0 and -x if x<0.

Function Abs:Float ( x:Float )


Returns the absolute value of x, that is, +x if x>=0 and -x if x<0.

Function Ceil:Float ( x:Float )


Returns the smallest integral value that is not less than x.

Function Clamp:Int ( x:Int, min:Int, max:Int )


Clamps x to the range min through max inclusive.

Function Clamp:Float ( x:Float, min:Float, max:Float )


Clamps x to the range min through max inclusive.

Function Cos:Float ( x:Float )


Returns the cosine of x degrees.

Function Cosr:Float ( x:Float )


Returns the cosine of x radians.

Function Exp:Float ( x:Float )


Returns the base-e exponential function of x, which is the e number raised to the power x.

Function Floor:Float ( x:Float )


Returns the largest integral value that is not greater than x.

Function Log:Float ( x:Float )


Returns the natural logarithm of x.

Function Max:Int ( x:Int, y:Int )


Returns the maximum of x and y.

Function Max:Float ( x:Float, y:Float )


Returns the maximum of x and y.

Function Min:Int ( x:Int, y:Int )


Returns the minimum of x and y.

Function Min:Float ( x:Float, y:Float )


Returns the minimum of x and y.

Function Pow:Float ( x:Float, y:Float )


Returns x raised to the power y.

Function Sgn:Int ( x:Int )


Returns -1 if x is less than zero, +1 if x is greater than zero or 0 if x is equal to zero.

Function Sgn:Float ( x:Float )


Returns -1 if x is less than zero, +1 if x is greater than zero or 0 if x is equal to zero.

Function Sin:Float ( x:Float )


Returns the sine of x degrees.

Function Sinr:Float ( x:Float )


Returns the sine of x radians.

Function Sqrt:Float ( x:Float )


Returns the square root of x.

Function Tan:Float ( x:Float )


Returns the tangent of x degrees.

Function Tanr:Float ( x:Float )


Returns the tangent of x radians.