Complex_d (struct)

The Complex_d type represents a complex number.

/*
** Example: Complex_d
*/

Complex_d c(-4.1, 3.14);

Complex_d Complex_d Complex_d

Members

Float64 re  

Methods

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

Operators

  + Complex_d
  - Complex_d
Complex_d = ( Param other )

Methods in detail

Complex_d ( in Complex_d other )

copy constructor


Complex_d ( in Float64 re )

Construct a complex number with real value re


Complex_d ( in Float64 re, in Float64 im )

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


Complex_d ( in SInt32 re )

Construct a complex number with real value re


Complex_d ()

default constructor


Boolean Complex_d.almostEqual? ( in Complex_d that )


Boolean Complex_d.almostEqual? ( in Complex_d that, in Float64 precision )

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


Float64 Complex_d.angle? ()

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


Complex_d.appendDesc? ( io String string )

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


Complex_d Complex_d.clone? ()

clone method


Complex_d Complex_d.conj? ()


Boolean Complex_d.equal? ( in Complex_d that )


UInt32 Complex_d.hash? ()


Complex_d Complex_d.inv? ()

Return the inverse of this complex number


Boolean Complex_d.isAlmostZero? ( in Float64 precision )

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


Boolean Complex_d.isAlmostZero? ()


Boolean Complex_d.isZero? ()

Check if the value is zero


Float64 Complex_d.length? ()

Return the length of this complex number


Float64 Complex_d.lengthSquared? ()


Complex_d Complex_d.linearInterpolate? ( in Complex_d that, in Float64 t )

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


Float64 Complex_d.norm? ()

Return the normalized value of this complex number


Float64 Complex_d.normSq? ()


Complex_d.normalize! ()

Normalize this complex number


Complex_d Complex_d.recip? ()

Return the reciprocal of this complex number


Float64 Complex_d.setUnit! ()


Complex_d Complex_d.unit? ()

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


Complex_d Complex_d.unit_safe? ()

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

Operators in detail



Complex_d = ( Param other )