edu.mit.sketch.util
Class AngleUtils

java.lang.Object
  extended by edu.mit.sketch.util.AngleUtils

public class AngleUtils
extends java.lang.Object


Constructor Summary
AngleUtils()
           
 
Method Summary
static double fixTheta(double theta)
          Normalize theta to be between 0 and 2pi
static double orientationDiff(double angle1, double angle2)
          Return the difference in the orientations of two angles.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AngleUtils

public AngleUtils()
Method Detail

fixTheta

public static double fixTheta(double theta)
Normalize theta to be between 0 and 2pi

Parameters:
theta - angle in radians
Returns:
angle between [0,2*pi)

orientationDiff

public static double orientationDiff(double angle1,
                                     double angle2)
Return the difference in the orientations of two angles.

Parameters:
angle1 - angle in radians
angle2 - angle in radians
Returns:
The difference in orientation, in the range [0,Pi]