repl.txt (780B)
1 2 {{alias}}( [out,] re, im, n ) 3 Rounds a complex number to the nearest multiple of `10^n` toward positive 4 infinity. 5 6 Parameters 7 ---------- 8 out: Array|TypedArray|Object (optional) 9 Output array. 10 11 re: number 12 Real component. 13 14 im: number 15 Imaginary component. 16 17 n: integer 18 Integer power of 10. 19 20 Returns 21 ------- 22 out: Array|TypedArray|Object 23 Real and imaginary components. 24 25 Examples 26 -------- 27 > var out = {{alias}}( 5.555, -3.333, -2 ) 28 [ 5.56, -3.33 ] 29 30 // Provide an output array: 31 > out = new {{alias:@stdlib/array/float64}}( 2 ); 32 > var v = {{alias}}( out, 5.555, -3.333, -2 ) 33 <Float64Array>[ 5.56, -3.33 ] 34 > var bool = ( v === out ) 35 true 36 37 See Also 38 -------- 39