cynosurex.math
Class Angle

java.lang.Object
  extended by cynosurex.math.Angle
All Implemented Interfaces:
cynosurex.internal.AuthorCommon, cynosurex.internal.CommonInterface, cynosurex.internal.CompanyCommon

public class Angle
extends java.lang.Object
implements cynosurex.internal.CommonInterface


Field Summary
protected  double angle
          Internal storage of the Angle in degrees.
static int DEGREE
           
static int RADIAN
           
 
Fields inherited from interface cynosurex.internal.CommonInterface
copyright, copyrightYears, notice, program, version
 
Fields inherited from interface cynosurex.internal.AuthorCommon
author, copyrightSymbol, noticeMsg, rights
 
Fields inherited from interface cynosurex.internal.CompanyCommon
company, email, website
 
Constructor Summary
Angle()
          Constructor to create an angle of 0 degrees.
Angle(double angle, int mode)
          Constructor to create an angle.
 
Method Summary
static double degreeToRadian(double degree)
          Degree to radian conversion.
 double getDegree()
          Returns the angle in degree.
 double getRadian()
          Returns the angle in radian.
static double radianToDegree(double radian)
          Radian to degree conversion.
 void setDegree(double degree)
          Set the angle in degree.
 void setRadian(double radian)
          Set the angle in radian.
 java.lang.String toString()
          This method overrides the super class method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEGREE

public static final int DEGREE
See Also:
Constant Field Values

RADIAN

public static final int RADIAN
See Also:
Constant Field Values

angle

protected double angle
Internal storage of the Angle in degrees.

Constructor Detail

Angle

public Angle()
Constructor to create an angle of 0 degrees.


Angle

public Angle(double angle,
             int mode)
      throws ModeNotDefinedException
Constructor to create an angle.

Parameters:
angle - angle specified in mode
mode - either degree or radian or other defined modes
Throws:
ModeNotDefinedException
Method Detail

getDegree

public double getDegree()
Returns the angle in degree.


setDegree

public void setDegree(double degree)
Set the angle in degree.

Parameters:
degree - angle specified in degrees

getRadian

public double getRadian()
Returns the angle in radian.


setRadian

public void setRadian(double radian)
Set the angle in radian.

Parameters:
radian - angle specified in radians

degreeToRadian

public static double degreeToRadian(double degree)
Degree to radian conversion. Retuns angle in radians.

Parameters:
degree - angle specified in degrees

radianToDegree

public static double radianToDegree(double radian)
Radian to degree conversion. Returns angle in degrees.

Parameters:
radian - angle specified in radians

toString

public java.lang.String toString()
This method overrides the super class method.

Overrides:
toString in class java.lang.Object