Math_Complex
[ class tree: Math_Complex ] [ index: Math_Complex ] [ all elements ]

Class: Math_Complex

Source Location: /Math_Complex-0.8/Complex.php

Class Overview


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


Author(s):

Version:

  • 0.8

Methods


Inherited Variables

Inherited Methods


Class Details

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

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



[ Top ]


Method Detail

Math_Complex (Constructor)   [line 61]

object Math_Complex Math_Complex( float $real, float $im)

Constructor for Math_Complex
  • Access: public

Parameters:

float   $real     Real part of the number
float   $im     Imaginary part of the number

[ Top ]

abs   [line 97]

float abs( )

Returns the magnitude (also referred as norm) of the number
  • Access: public

[ Top ]

abs2   [line 87]

float abs2( )

Returns the square of the magnitude of the number
  • Access: public

[ Top ]

angle   [line 135]

mixed angle( )

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

[ Top ]

arg   [line 118]

mixed arg( )

Returns the argument of the complex number
  • Return: A float on success, a PEAR_Error otherwise
  • Access: public

[ Top ]

getIm   [line 154]

float getIm( )

Returns the imaginary part of the complex number
  • Access: public

[ Top ]

getReal   [line 145]

float getReal( )

Returns the real part of the complex number

[ Top ]

norm   [line 108]

float norm( )

Returns the norm of the number Alias of Math_Complex::abs()
  • Access: public

[ Top ]

toString   [line 72]

string toString( )

Simple string representation of the number
  • Access: public

[ Top ]


Documentation generated on Fri, 30 Apr 2004 21:51:50 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.