rect> ( x y -- z )
Factor documentation > Factor handbook > The language > Numbers > Complex numbers
Prev:>rect ( z -- x y )
Next:Embedding of real numbers in complex numbers


Vocabulary
math.functions

Inputs and outputs
xa real
ya real
za number


Word description
Creates a complex number from real and imaginary components. If z is an integer zero, this will simply output x.

Definition
USING: kernel math ;

IN: math.functions

: rect> ( x y -- z ) dup 0 = [ drop ] [ complex boa ] if ;
inline