Touch Develop retirement postponed until June 22, 2019. Sign-in and access to cloud assets to be removed on May 23, 2018.Learn More..


Math

Math goodness, abs, max, ...
function math → abs(x : Number) returns Number
Returns the absolute value of a number
function math → acos(x : Number) returns Number
Returns the angle whose cosine is the specified number
function math → asin(x : Number) returns Number
Returns the angle whose sine is the specified number
function math → atan(x : Number) returns Number
Returns the angle whose tangent is the specified number
function math → atan2(y : Number, x : Number) returns Number
Returns the angle whose tangent is the quotient of two specified numbers
function math → ceiling(x : Number) returns Number
Returns the smallest integral value greater than or equal to the specified number
function math → clamp(min : Number, max : Number, value : Number) returns Number
Clamps value between min and max
function math → cos(angle : Number) returns Number
Returns the cosine of the specified angle (in radians)
function math → cosh(angle : Number) returns Number
Returns the hyperbolic cosine of the specified angle (in radians)
function math → create matrix(rows : Number, columns : Number) returns Matrix
Creates a matrix of zeros of a given size
function math → create vector3(x : Number, y : Number, z : Number) returns Vector3
Creates a 3D vector
function math → deg to rad(degrees : Number) returns Number
Converts degrees into radians
function math → div(x : Number, y : Number) returns Number
Returns the result of integer division of one number by another number
function math → e returns Number
Returns the natural logarithmic base, specified by the constant, e
function math → ε returns Number
Returns the machine epsilon, the smallest positive number greater than zero.
function math → exp(x : Number) returns Number
Returns e raised to the specified power
function math → floor(x : Number) returns Number
Returns the largest integer less than or equal to the specified number
function math → gravity returns Number
Returns the gravity constant (9.80665)
function math → ieee remainder(x : Number, y : Number) returns Number
Returns the remainder resulting from the division of a specified number by another specified number
function math → is ∞(x : Number) returns Boolean
Indicates whether number evaluates to negative or positive infinity
function math → is nan(x : Number) returns Boolean
Indicates that value cannot be represented as a number, i.e. Not-a-Number. This usually happens when the number is the result of a division by zero.
function math → is ∞₋(x : Number) returns Boolean
Indicates whether number evaluates to negative infinity
function math → is ∞₊(x : Number) returns Boolean
Indicates whether number evaluates to positive infinity
function math → log(x : Number, base : Number) returns Number
Returns the logarithm of a specified number in a specified base
function math → log10(x : Number) returns Number
Returns the base 10 logarithm of a specified number
function math → loge(x : Number) returns Number
Returns the natural (base e) logarithm of a specified number
function math → map range(x : Number, in min : Number, in max : Number, out min : Number, out max : Number) returns Number
Maps an integer value from one range to another. Does not contrain the value.
function math → max(x : Number, y : Number) returns Number
Returns the larger of two numbers
function math → min(x : Number, y : Number) returns Number
Returns the smaller of two numbers
function math → mod(x : Number, y : Number) returns Number
Returns the modulus resulting from the division of one number by another number
function math → ∞₋ returns Number
Returns the negative infinity
function math → normalize(value : Number) returns Number
Clamps value between 0 and 1.
function math → π returns Number
Returns the Pi constant
function math → ∞₊ returns Number
Returns the positive infinity
function math → pow(x : Number, y : Number) returns Number
Returns a specified number raised to the specified power
function math → rad to deg(radians : Number) returns Number
Converts rad into degrees
function math → random(limit : Number) returns Number
Returns a random integral number bounded between limit and 0, not including limit unless it is 0
function math → random normalized returns Number
Returns a random floating-point number x: 0 ≤ x < 1
function math → random range(min : Number, max : Number) returns Number
Returns a random integral number between min and max included.
function math → range(start : Number, length : Number) returns Collection of Number
Return numbers between start and start + length - 1 inclusively
function math → round(x : Number) returns Number
Rounds a number to the nearest integral value
function math → round with precision(x : Number, digits : Number) returns Number
Rounds a number to a specified number of fractional digits.
function math → sign(x : Number) returns Number
Returns a value indicating the sign of a number
function math → sin(angle : Number) returns Number
Returns the sine of the specified angle (in radians)
function math → sinh(angle : Number) returns Number
Returns the hyperbolic sine of the specified angle (in radians)
function math → sqrt(x : Number) returns Number
Returns the square root of a specified number
function math → tan(angle : Number) returns Number
Returns the tangent of the specified angle (in radians)
function math → tanh(angle : Number) returns Number
Returns the hyperbolic tangent of the specified angle (in radians)

edit this topic ryumzydxce