|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode.util.Utils
public class Utils
Utility class that provide methods for normalizing angles.
Method Summary | |
---|---|
static boolean |
isNear(double angle1,
double angle2)
Tests if the two specified angles are near to each other. |
static double |
normalAbsoluteAngle(double angle)
Normalizes an angle to an absolute angle. |
static double |
normalNearAbsoluteAngle(double angle)
Normalizes an angle to be near an absolute angle. |
static double |
normalRelativeAngle(double angle)
Normalizes an angle to a relative angle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static double normalAbsoluteAngle(double angle)
angle
- the angle to normalize
public static double normalRelativeAngle(double angle)
angle
- the angle to normalize
public static double normalNearAbsoluteAngle(double angle)
isNear
method is used for defining when the angle is near one of angles listed
above.
angle
- the angle to normalize
normalAbsoluteAngle(double)
,
isNear(double, double)
public static boolean isNear(double angle1, double angle2)
(Math.abs(angle1 - angle2) < .00001)
angle1
- the first angleangle2
- the second angle
true
if the two angles are near to each other;
false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |