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.


Constructor Index

 o Helper()

Method Index

 o angleTowards(Position)
Angle between (0,0) and the given position, in radians.
 o deg2rad(double)
Converts degrees into radians
 o rad2deg(double)
Converts radians into degrees
 o shortestTurn(double, double)
Returns +/- (targetAngle-startAngle), depending on which is shorter.

Constructors

 o Helper
 public Helper()

Methods

 o rad2deg
 public static double rad2deg(double radians)
Converts radians into degrees

 o deg2rad
 public static double deg2rad(double degrees)
Converts degrees into radians

 o angleTowards
 public static double angleTowards(Position target)
Angle between (0,0) and the given position, in radians. 0=east.

 o 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
1