math.sincos() function

Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.50 is the most recent stable version of Flux.

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

Output data format: Object

import "math"

math.sincos(x: 1.23)

// Returns {sin: 0.9424888019316975, cos: 0.3642377271245026}

Parameters

x

The value used in the operation.

Data type: Float

Special cases

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