math.sincos() function

The math.sincos() function returns the values of math.sin(x:x) and math.cos(x:x).

*Output data format: Record*

  1. import "math"
  2. math.sincos(x: 1.23)
  3. // Returns {sin: 0.9424888019316975, cos: 0.3342377271245026}

Parameters

x

The value used in the operation.

*Data type: Float*

Special cases

  1. math.sincos(x: ±0) // Returns {sin: ±0, cos: 1}
  2. math.sincos(x: ±Inf) // Returns {sin: NaN, cos: NaN}
  3. math.sincos(x: NaN) // Returns {sin: NaN, cos: NaN}