repl.txt (699B)
1 2 {{alias}}( [out,] re, im ) 3 Returns the absolute value and phase of a complex number. 4 5 Parameters 6 ---------- 7 out: Array|TypedArray|Object (optional) 8 Output array. 9 10 re: number 11 Real component. 12 13 im: number 14 Imaginary component. 15 16 Returns 17 ------- 18 out: Array|TypedArray|Object 19 Absolute value and phase, respectively. 20 21 Examples 22 -------- 23 > var out = {{alias}}( 5.0, 3.0 ) 24 [ ~5.83, ~0.5404 ] 25 26 // Provide an output array: 27 > out = new {{alias:@stdlib/array/float64}}( 2 ); 28 > var v = {{alias}}( out, 5.0, 3.0 ) 29 <Float64Array>[ ~5.83, ~0.5404 ] 30 > var bool = ( v === out ) 31 true 32 33 See Also 34 -------- 35