jwo.utils.structure
Class JWComplex

java.lang.Object
  extended byjwo.utils.structure.JWComplex

public class JWComplex
extends Object

Simple class to store complex numbers

Version:
2.1, 23rd November, 2003
Author:
Jo Wood.

Field Summary
 float imaginary
          Imaginary component of complex number.
 float real
          Real component of complex number.
 
Constructor Summary
JWComplex()
          Initialises complex number as (0,0).
JWComplex(float real)
          Initialises complex number as (real,0).
JWComplex(float real, float imaginary)
          Initialises complex number as (real,imaginary).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

real

public float real
Real component of complex number.


imaginary

public float imaginary
Imaginary component of complex number.

Constructor Detail

JWComplex

public JWComplex()
Initialises complex number as (0,0).


JWComplex

public JWComplex(float real)
Initialises complex number as (real,0).

Parameters:
real - Real component of complex number.

JWComplex

public JWComplex(float real,
                 float imaginary)
Initialises complex number as (real,imaginary).

Parameters:
real - Real component of complex number.
imaginary - Imaginary component of complex number.


Copyright Jo Wood, 1996-2004, last modified, 3rd September, 2004