Method |
Description |
|
__construct ( ValueObjects\Number\Real $real, ValueObjects\Number\Real $im ) |
Returns a Complex object give its real and imaginary parts as parameters |
|
__toString ( ) : string |
Returns a native string version of the Complex object in format "${real} +|- ${complex}i" |
|
fromNative ( ) : Complex | ValueObjects\ValueObjectInterface |
Returns a new Complex object from native PHP arguments |
|
fromPolar ( ValueObjects\Number\Real $modulus, ValueObjects\Number\Real $argument ) : Complex |
Returns a Complex given polar coordinates |
|
getArgument ( ) : ValueObjects\Number\Real |
Returns the argument (or phase) of the Complex number |
|
getIm ( ) : ValueObjects\Number\Real |
Returns the imaginary part of the complex number |
|
getModulus ( ) : ValueObjects\Number\Real |
Returns the modulus (or absolute value or magnitude) of the Complex number |
|
getReal ( ) : ValueObjects\Number\Real |
Returns the real part of the complex number |
|
sameValueAs ( ValueObjects\ValueObjectInterface $complex ) |
|
|
toNative ( ) : array |
Returns the native value of the real and imaginary parts as an array |
|