User Tools

Site Tools


script:module:math

Math (Module)

Module that provides math-related functions.

Functions

cos ( n : Number )

Cosine of n.

random ( )

Returns a random number between 0 and 1.

randInt ( low : Number, high : Number )

Returns a random integer in the range lowhigh. The range is inclusive at both ends, so this is possible:

$ Math.randInt(0, 3)
⇒ 3

randNum ( low : Number, high : Number )

Returns a random floating-point number in the range lowhigh.

sin ( n : Number )

Sine of n.

tan ( n : Number )

Tangent of n.

script/module/math.txt · Last modified: 2019-12-22 06:33 by skyjake