Your browser does not support HTML5 canvas. Fork me on GitHub

Available Packages:

Maths

Source

real EULER

Source

Euler's constant

real PI

Source

PI constant

real PI2

Source

PI * 2 constant

real PIHALF

Source

PI / 2 constant

function getSlopeAngle(real z1, real z2, real dist) returns angle

Source

Returns the angle of a height-slope

function hypot(real dx, real dy) returns real

Source

Returns the length of the hypotenuse of a right-angle triangle with the given side lengths. Does not overflow or underflow as fast as SquareRoot(x^2 + y^2) does.

function max(vararg integer numbers) returns int

Source

Returns the largest value in the set provided as arguments. Example: max(6, 4, -12) // Returns 6.

function max(vararg real numbers) returns real

Source

Returns the largest value in the set provided as arguments. Example: max(6.5, 4.5, -12.5) // Returns 6.5.

function min(vararg integer numbers) returns int

Source

Returns the smallest value in the set provided as arguments. Example: min(6, 4, -12) // Returns -12.

function min(vararg real numbers) returns real

Source

Returns the smallest value in the set provided as arguments. Example: min(6.5, 4.5, -12.5) // Returns -12,5.

function int.moduloInt(int divisor) returns int

Source