Methods summary
public
chippyash\Type\Number\Rational\RationalType
|
#
r( )
Get the real part
Returns
|
public
chippyash\Type\Number\Rational\RationalType
|
#
i( )
Get the imaginary part
Returns
|
public
boolean
|
#
isZero( )
Is this number equal to zero?
Is this number equal to zero?
Returns
boolean boolean
|
public
boolean
|
#
isReal( )
Is this number a real number? i.e. is it in form n+0i
Is this number a real number? i.e. is it in form n+0i
Returns
boolean boolean
|
public
boolean
|
#
isGaussian( )
Is this number Gaussian, i.e r & i are both equivelent to integers
Is this number Gaussian, i.e r & i are both equivelent to integers
Returns
boolean boolean
Link
|
public
chippyash\Type\Number\Complex\ComplexType
|
#
conjugate( )
Return conjugate of this number
Return conjugate of this number
Returns
|
public
chippyash\Type\Number\Rational\RationalType
|
#
modulus( )
Return the modulus, also known as absolute value or magnitude of this number
= sqrt(r2 + i2);
Return the modulus, also known as absolute value or magnitude of this number
= sqrt(r2 + i2);
Returns
|
public
chippyash\Type\Number\Rational\RationalType
|
#
theta( )
Return the angle (sometimes known as the argument) of the number when
expressed in polar notation
Return the angle (sometimes known as the argument) of the number when
expressed in polar notation
The return value is a rational expressing theta as radians
Returns
|
public
chippyash\Type\Number\Rational\RationalType
|
#
radius( )
Return the radius (sometimes known as Rho) of the number when expressed in
polar notation
Return the radius (sometimes known as Rho) of the number when expressed in
polar notation
Returns
|
public
array[radius
|
#
asPolar( )
Returns complex number expressed in polar form
Returns complex number expressed in polar form
radius == this->modulus() theta is angle expressed in radians
Returns
array[radius => RationalType, theta => RationalType]
|
public
integer
|
#
polarQuadrant( )
Returns the polar quadrant for the complex number Returns 1, 2, 3 or 4
dependent on the quadrant
Returns the polar quadrant for the complex number Returns 1, 2, 3 or 4
dependent on the quadrant
Returns
integer int
|
public
string
|
#
polarString( )
Return complex number expressed as a string in polar form i.e. r(cosθ +
i⋅sinθ)
Return complex number expressed as a string in polar form i.e. r(cosθ +
i⋅sinθ)
Returns
string string
|