1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
{{alias}}( [out,] re1, im1, re2, im2 )
Adds two complex numbers.
Parameters
----------
out: Array|TypedArray|Object (optional)
Output array.
re1: number
Real component.
im1: number
Imaginary component.
re2: number
Real component.
im2: number
Imaginary component.
Returns
-------
out: Array|TypedArray|Object
Real and imaginary components.
Examples
--------
> var y = {{alias}}( 5.0, 3.0, -2.0, 1.0 )
[ 3.0, 4.0 ]
// Provide an output array:
> var out = new {{alias:@stdlib/array/float32}}( 2 );
> y = {{alias}}( out, 5.0, 3.0, -2.0, 1.0 )
<Float32Array>[ 3.0, 4.0 ]
> var bool = ( y === out )
true
See Also
--------
|