repl.txt (764B)
1 2 {{alias}}( [out,] re, im, y ) 3 Returns a complex number with the same magnitude as `z` and the sign of 4 `y*z`. 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 y: number 18 Number from which to derive the sign. 19 20 Returns 21 ------- 22 out: Array|TypedArray|Object 23 Function result. 24 25 Examples 26 -------- 27 > var out = {{alias}}( -4.2, 5.5, -9 ) 28 [ 4.2, -5.5 ] 29 30 // Provide an output array: 31 > out = new {{alias:@stdlib/array/float64}}( 2 ); 32 > var v = {{alias}}( out, -4.2, 5.5, 8 ) 33 <Float64Array>[ -4.2, 5.5 ] 34 > var bool = ( v === out ) 35 true 36 37 See Also 38 -------- 39