JS functions for Maths.
Example of doing math calculations within JS.
Returns the arctangent (in radians) of a number. The returned value is between -π/2 and π/2.
Returns a number, decimal between 0 and 1.
Returns the cosine of a number in radians. The returned value is between -1 and 1.
Returns the number PI.
Returns the sine of a number in radians. The returned value is between -1 and 1.
Calculates and returns the square root of a number.
Returns the tangent of a number in radians
Turns any number into a positive number. If positive no change, if negative the value is multiplied by -1.
Returns the value of a base raised to a power
Rounds a number always upwards direction.
Rounds a number always downwards direction.
Rounds a number to the closest whole number.