MathLib.arctan()

MathLib.arctan() calculates the inverse tangent of a number. \[ \text{MathLib.arctan}(x) = \arctan(x) \]

Examples

To calculate the inverse tangent of 2 type: MathLib.arctan(2);

Specification

MathLib.arctan accepts one argument. Any additional arguments will be ignored. The type of the argument should be number. For other argument types see the unary function specification.
  1. MathLib.arctan(NaN) = NaN
  2. MathLib.arctan(+0) = +0
  3. MathLib.arctan(-0) = -0
  4. MathLib.arctan(+∞) = +π/2
  5. MathLib.arctan(-∞) = -π/2
  6. otherwise MathLib.arctan(x) = inverse tangent of x

Implementation

MathLib uses the built-in JavaScript implementation Math.atan.

Tests

Categories: unary Function