MathLib.sin() calculates the sine of a number (given in radians). \[ \text{MathLib.sin}(x) = \sin(x) \]


To calculate the sine of 2 type: MathLib.sin(2);


MathLib.sin 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.sin(NaN) = NaN
  2. MathLib.sin(+0) = +0
  3. MathLib.sin(-0) = -0
  4. MathLib.sin(+∞) = NaN
  5. MathLib.sin(-∞) = NaN
  6. otherwise MathLib.sin(x) = sine of x


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

Possible issues

MathLib expects the input argument to be in radians. If you want to insert the angle in degrees (let's say 90°), use:


Categories: unary Function