|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dartra.util.LocationTools
This class provides tools for working with locations (x-y tuples).
Method Summary | |
static double |
getAngle(double x1,
double y1,
double x2,
double y2)
Returns the angle from location (x1, y1) to location (x2, y2). |
static double |
getDistance(double x1,
double y1,
double x2,
double y2)
Returns the distance between the locations (x1, y1) and (x2, y2). |
static Location |
getLocation(double x,
double y,
double angle,
double distance)
Returns the Location at the given angle and distance from the given Location (x1, y1). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static double getDistance(double x1, double y1, double x2, double y2)
Returns the distance between the locations (x1, y1) and (x2, y2).
public static double getAngle(double x1, double y1, double x2, double y2)
Returns the angle from location (x1, y1) to location (x2, y2).
public static Location getLocation(double x, double y, double angle, double distance)
Returns the Location at the given angle and distance from the given Location (x1, y1).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |