Complex (struct)

The Complex type represents a complex number.

/*
** Example: Complex
*/

Complex c(-4.1, 3.14);

Complex Complex Complex

Members

Scalar re  

Methods

  Complex ( in Complex other )
  Complex ( in SInt32 re )
  Complex ( in Scalar re )
  Complex ( in Scalar re, in Scalar im )
  Complex ()
Boolean almostEqual ? ( in Complex that )
Boolean almostEqual ? ( in Complex that, in Scalar precision )
Scalar angle ? ()
  appendDesc ? ( io String string )
Complex clone ? ()
Complex conj ? ()
Boolean equal ? ( in Complex that )
UInt32 hash ? ()
Complex inv ? ()
Boolean isAlmostZero ? ( in Scalar precision )
Boolean isAlmostZero ? ()
Boolean isZero ? ()
Scalar length ? ()
Scalar lengthSquared ? ()
Complex linearInterpolate ? ( in Complex that, in Scalar t )
Scalar norm ? ()
Scalar normSq ? ()
  normalize ! ()
Complex recip ? ()
Scalar setUnit ! ()
Complex unit ? ()
Complex unit_safe ? ()

Operators

  + Complex
  - Complex
Complex = ( Param other )

Methods in detail

Complex ( in Complex other )

copy constructor


Complex ( in SInt32 re )

Construct a complex number with real value re


Complex ( in Scalar re )

Construct a complex number with real value re


Complex ( in Scalar re, in Scalar im )

Construct a complex number with real value re and imaginary value im


Complex ()

default constructor


Boolean Complex.almostEqual? ( in Complex that )


Boolean Complex.almostEqual? ( in Complex that, in Scalar precision )

Check if the value of the complex number is equal to that, within the specified precision


Scalar Complex.angle? ()

Return the angle of the complex number from its real and imaginary components


Complex.appendDesc? ( io String string )

Append a String description of this complex number to the io String string


Complex Complex.clone? ()

clone method


Complex Complex.conj? ()


Boolean Complex.equal? ( in Complex that )


UInt32 Complex.hash? ()


Complex Complex.inv? ()

Return the inverse of this complex number


Boolean Complex.isAlmostZero? ( in Scalar precision )

Check if the value of the complex number is close enough zero, within the specified precision


Boolean Complex.isAlmostZero? ()


Boolean Complex.isZero? ()

Check if the value is zero


Scalar Complex.length? ()

Return the length of this complex number


Scalar Complex.lengthSquared? ()


Complex Complex.linearInterpolate? ( in Complex that, in Scalar t )

Linearly interpolates this vector with another one based on a scalar blend value (0.0 to 1.0)


Scalar Complex.norm? ()

Return the normalized value of this complex number


Scalar Complex.normSq? ()


Complex.normalize! ()

Normalize this complex number


Complex Complex.recip? ()

Return the reciprocal of this complex number


Scalar Complex.setUnit! ()


Complex Complex.unit? ()

Returns the unit vector of this one, throws and exception if almost zero length


Complex Complex.unit_safe? ()

Returns the unit vector of this one, with a value of 1 if almost zero length

Operators in detail



Complex = ( Param other )