Class VectorQuantity

java.lang.Object
  |
  +--VectorQuantity

public class VectorQuantity
extends java.lang.Object

VectoryQuantity is a "struct class" -- a simple container that represents the components of a vector: magnitude and direction.

Version:
$Id: VectorQuantity.java,v 1.4 2001/11/24 22:57:31 srevilak Exp $
Author:
Steve Revilak

Field Summary
 double direction
          The direction of the vector (in radians),
 double magnitude
          The magnitude of the vector.
 
Constructor Summary
VectorQuantity()
          Construct a new VectorQuantity with magnitude and direction of zero.
VectorQuantity(double magnitude, double direction)
          Construct a new VectorQuantity object with the specified magnitude and direction.
 
Method Summary
 java.lang.String toString()
          Return an informative string representation of this VectorQuantity object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

magnitude

public double magnitude
The magnitude of the vector.

direction

public double direction
The direction of the vector (in radians),
Constructor Detail

VectorQuantity

public VectorQuantity()
Construct a new VectorQuantity with magnitude and direction of zero.

VectorQuantity

public VectorQuantity(double magnitude,
                      double direction)
Construct a new VectorQuantity object with the specified magnitude and direction.
Method Detail

toString

public java.lang.String toString()
Return an informative string representation of this VectorQuantity object.
Overrides:
toString in class java.lang.Object