mathjs/docs/constants.md

310 B

Constants

Math.js has the following built-in constants.

  • math.E, math.e
  • math.I, math.i
  • math.Infinity
  • math.LN2
  • math.LN10
  • math.LOG2E
  • math.LOG10E
  • math.NaN
  • math.PI, math.pi
  • math.SQRT1_2
  • math.SQRT2

Example usage:

math.sin(math.pi / 4);  // 0.70711
math.i * math.i;        // -1