Skip to content

Functions Math

Jason Barr edited this page Sep 22, 2021 · 2 revisions

A functional, curried interface to the JavaScript Math object, plus some additional math-related functions.

The Functions

  • abs
  • acos
  • acosh
  • asin
  • asinh
  • atan
  • atan2
  • atanh
  • calcAngleDegrees - use a point's coordinates to calculate the angle from origin
  • cbrt
  • ceil
  • clz32
  • cos
  • cosh
  • dec - decrement by 1
  • e - returns E
  • exp
  • expm1
  • floor
  • fround
  • hypot
  • imul
  • inc - increment by 1
  • ln2
  • ln10
  • log
  • log1p
  • log2
  • log10
  • log10e
  • max - works on a series of numbers, or on one or more arrays of numbers
  • min - works on a series of numbers, or on one or more arrays of numbers
  • pi - returns pi
  • pow
  • randInt - returns a random integer between start and end (both inclusive)
  • random
  • round
  • sign
  • sin
  • sqrt
  • sqrt1_2
  • sqrt2
  • tan
  • tanh
  • trunc
Clone this wiki locally