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

Class: Math_Complex

Source Location: /Math_Complex-0.8.6/Math/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 41]
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 68]

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 109]

float abs( )

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

[ Top ]

abs2   [line 97]

float abs2( )

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

[ Top ]

angle   [line 153]

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 134]

float|PEAR_Error arg( )

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

[ Top ]

getIm   [line 175]

float getIm( )

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

[ Top ]

getReal   [line 164]

float getReal( )

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

[ Top ]

norm   [line 122]

float norm( )

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

[ Top ]

toString   [line 80]

string toString( )

Simple string representation of the number
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:23 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.