Variables

read onlyPI:Float

The PI number.

Methods

abs(v:Float):Float

Get the absolute value of v.

Parameters:

v

Returns:

Float

atan2(y:Float, x:Float):Float

Get the angle of the given vector, defined by its y and x coordinates.

Parameters:

y
x

Returns:

Float

cos(a:Float):Float

Get the cosinus of the given angle.

Parameters:

a

Angle in radian.

Returns:

Float

degToRad(a:Float):Float

Convert an angle in degree to radian.

Parameters:

a

Returns:

Float

imax(a:Int, b:Int):Int

Get the smaller value from a and b.

Parameters:

a
b

Returns:

Int

imin(a:Int, b:Int):Int

Get the higher value from a and b.

Parameters:

a
b

Returns:

Int

@:value({ max : 1 })irandom(max:Int = 1):Int

Generate a random int number between 0 included and max excluded;

Parameters:

max

Returns:

Int

max(a:Float, b:Float):Float

Get the smaller value from a and b.

Parameters:

a
b

Returns:

Float

min(a:Float, b:Float):Float

Get the higher value from a and b.

Parameters:

a
b

Returns:

Float

pow(v:Float, exp:Float):Float

Get a base raised to a power exp.

Parameters:

v
exp

Returns:

Float

radToDeg(a:Float):Float

Convert an angle in radian to degree.

Parameters:

a

Returns:

Float

@:value({ max : 1. })random(max:Float = 1.):Float

Generate a random float number between 0. included and max excluded.

Parameters:

max

[Optional] The maximum number to random. 1. by default.

Returns:

Float

sin(a:Float):Float

Get the sinus of the given angle.

Parameters:

a

Angle in radian.

Returns:

Float