Class Math_Complex

Description

Math_Complex: class to represent an manipulate complex numbers (z = a + b*i)

Originally this class was part of NumPHP (Numeric PHP package)

Located in Program_Root/Math_Complex/Complex.php (line 35)


	
			
Method Summary
object Math_Complex Math_Complex (float $real, float $im)
float abs ()
float abs2 ()
mixed angle ()
mixed arg ()
float getIm ()
float getReal ()
float norm ()
string toString ()
Methods
Constructor Math_Complex (line 61)

Constructor for Math_Complex

  • access: public
object Math_Complex Math_Complex (float $real, float $im)
  • float $real:

    Real part of the number

  • float $im:

    Imaginary part of the number

abs (line 97)

Returns the magnitude (also referred as norm) of the number

  • access: public
float abs ()
abs2 (line 87)

Returns the square of the magnitude of the number

  • access: public
float abs2 ()
angle (line 135)

Returns the angle (argument) associated with the complex number Alias of Math_Complex::arg()

  • return:

    A float on success, a PEAR_Error otherwise

  • access: public
mixed angle ()
arg (line 118)

Returns the argument of the complex number

  • return:

    A float on success, a PEAR_Error otherwise

  • access: public
mixed arg ()
getIm (line 154)

Returns the imaginary part of the complex number

  • access: public
float getIm ()
getReal (line 145)

Returns the real part of the complex number

float getReal ()
norm (line 108)

Returns the norm of the number Alias of Math_Complex::abs()

  • access: public
float norm ()
toString (line 72)

Simple string representation of the number

  • access: public
string toString ()

Documention generated on Fri, 27 Jun 2003 18:28:27 -0700 by phpDocumentor 1.2.0