Math Extension

The basic extensions for Math.

tango.math.mod(i, n): number

Returns a positive number xx, where i=kn+x,(x[0,n))i = k * n + x, (x \in [0, n) ).

tango.math.range(start = 0, end, step = 1): []

Generates an array of range from start (inclusive) to end (exclusive), with that step.

tango.math.randomInteger(a = 0, b): number

Gets a random integer xx, where axb a \leq x \leq b .

results matching ""

    No results matching ""