Namespace: MathUtils

Utils.MathUtils

An object that is used as a static class for math utilities.

Methods

Utils.MathUtils.greaterThan (a, b)Boolean static

floating point ">=" checking against _EPSILON (see: _EPSILON)
Name Type Description
a Number floating point number
b Number floating point number
Returns:
Type Description
Boolean true if abs(a-b) >= _EPSILON; false otherwise

Utils.MathUtils.lesserThan (a, b)Boolean static

floating point "<" checking against _EPSILON (see: _EPSILON)
Name Type Description
a Number floating point number
b Number floating point number
Returns:
Type Description
Boolean true if abs(a-b) < _EPSILON; false otherwise

Utils.MathUtils.sign (n)Number static

gets number sign
Name Type Description
n Number the number
Returns:
Type Description
Number 0 if n is 0; 1 if n > 0; -1 otherwise

Utils.MathUtils.square (n)Number static

squares a number
Name Type Description
n Number the number to square
Returns:
Type Description
Number the squared number

Utils.MathUtils.toRad (deg)Number static

converts degrees to radians
Name Type Description
deg Number the angle in degrees
Returns:
Type Description
Number the corresponding radians to the angle.