All Packages Class Hierarchy This Package Previous Next Index
Class ch.jp.robwar.Helper
java.lang.Object
|
+----ch.jp.robwar.Helper
- public class Helper
- extends Object
This class groups helper functions that can be useful to
the WOR programmer.
-
Helper()
-
-
angleTowards(Position)
- Angle between (0,0) and the given position, in radians.
-
deg2rad(double)
- Converts degrees into radians
-
rad2deg(double)
- Converts radians into degrees
-
shortestTurn(double, double)
- Returns +/- (targetAngle-startAngle), depending on which
is shorter.
Helper
public Helper()
rad2deg
public static double rad2deg(double radians)
- Converts radians into degrees
deg2rad
public static double deg2rad(double degrees)
- Converts degrees into radians
angleTowards
public static double angleTowards(Position target)
- Angle between (0,0) and the given position, in radians.
0=east.
shortestTurn
public static double shortestTurn(double startAngle,
double targetAngle)
- Returns +/- (targetAngle-startAngle), depending on which
is shorter. The angles given in parameter can have any
value; the return value will be between -Pi and Pi.
All Packages Class Hierarchy This Package Previous Next Index