repl.txt (754B)
1 2 {{alias}}( [out,] x ) 3 Simultaneously computes the sine and cosine of a number times π. 4 5 Parameters 6 ---------- 7 out: Array|TypedArray|Object (optional) 8 Destination array. 9 10 x: number 11 Input value. 12 13 Returns 14 ------- 15 y: Array|TypedArray|Object 16 Two-element array containing sin(πx) and cos(πx). 17 18 Examples 19 -------- 20 > var y = {{alias}}( 0.0 ) 21 [ 0.0, 1.0 ] 22 > y = {{alias}}( 0.5 ) 23 [ 1.0, 0.0 ] 24 > y = {{alias}}( 0.1 ) 25 [ ~0.309, ~0.951 ] 26 > y = {{alias}}( NaN ) 27 [ NaN, NaN ] 28 29 > var out = new {{alias:@stdlib/array/float64}}( 2 ); 30 > var v = {{alias}}( out, 0.0 ) 31 <Float64Array>[ 0.0, 1.0 ] 32 > var bool = ( v === out ) 33 true 34 35 See Also 36 -------- 37