Wraps the math functions and constants from Javascript's built-in Math object.
See Math Reference at MDN.
type Radians = NumberAn alias to make types in this module more explicit.
abs :: Number -> NumberReturns the absolute value of the argument.
acos :: Number -> RadiansReturns the inverse cosine of the argument.
asin :: Number -> RadiansReturns the inverse sine of the argument.
atan :: Number -> RadiansReturns the inverse tangent of the argument.
atan2 :: Number -> Number -> RadiansFour-quadrant tangent inverse. Given the arguments y and x, returns
the inverse tangent of y / x, where the signs of both arguments are used
to determine the sign of the result.
If the first argument is negative, the result will be negative.
The result is the angle between the positive x axis and a point (x, y).
ceil :: Number -> IntReturns the smallest integer not smaller than the argument.
cos :: Radians -> NumberReturns the cosine of the argument.
exp :: Number -> NumberReturns e exponentiated to the power of the argument.
floor :: Number -> IntReturns the largest integer not larger than the argument.
log :: Number -> NumberReturns the natural logarithm of a number.
max :: Number -> Number -> NumberReturns the largest of two numbers.
min :: Number -> Number -> NumberReturns the smallest of two numbers.
pow :: Number -> Number -> NumberReturn the first argument exponentiated to the power of the second argument.
round :: Number -> IntReturns the integer closest to the argument.
sin :: Radians -> NumberReturns the sine of the argument.
sqrt :: Number -> NumberReturns the square root of the argument.
tan :: Radians -> NumberReturns the tangent of the argument.
(%) :: Number -> Number -> Intleft-associative / precedence 7
Computes the remainder after division, wrapping Javascript's % operator.
e :: NumberThe base of natural logarithms, e, around 2.71828.
ln2 :: NumberThe natural logarithm of 2, around 0.6931.
ln10 :: NumberThe natural logarithm of 10, around 2.3025.
log2e :: NumberThe base 2 logarithm of e, around 1.4426.
log10e :: NumberBase 10 logarithm of e, around 0.43429.
pi :: NumberThe ratio of the circumference of a circle to its diameter, around 3.14159.
sqrt1_2 :: NumberThe Square root of one half, around 0.707107.
sqrt2 :: NumberThe square root of two, around 1.41421.