sim.physics2D.util
Class Angle

java.lang.Object
  extended by sim.physics2D.util.Angle

public class Angle
extends java.lang.Object

Angle handles adding angles and ensuring that the result never gets above 2PI or below 0.


Field Summary
static double halfPI
           
 double radians
           
static double twoPI
           
 
Constructor Summary
Angle(double radians)
           
 
Method Summary
 Angle add(Angle other)
          Adds two angles and makes sure the result doesn't falls below 0 or above 2 P
 Angle add(double radians)
          Adds two angles and makes sure the result doesn't falls below 0 or above 2 P
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

radians

public final double radians

twoPI

public static final double twoPI
See Also:
Constant Field Values

halfPI

public static final double halfPI
See Also:
Constant Field Values
Constructor Detail

Angle

public Angle(double radians)
Method Detail

add

public Angle add(Angle other)
Adds two angles and makes sure the result doesn't falls below 0 or above 2 P


add

public Angle add(double radians)
Adds two angles and makes sure the result doesn't falls below 0 or above 2 P