| java.lang.Object com.vividsolutions.jump.geom.Angle
Angle | public class Angle (Code) | | Utility functions for working with angles.
|
Method Summary | |
public static double | angle(Coordinate p0, Coordinate p1) Returns the angle of the vector from p0 to p1. | public static double | angle(Coordinate p) Returns the angle of the vector from (0,) to p. | public static double | angleBetween(Coordinate tail, Coordinate tip1, Coordinate tip2) Returns the angle between two vectors. | public static double | diff(double a1, double a2) Returns the angle between two vectors. | public static int | getTurn(double a1, double a2) Returns whether an angle must turn clockwise or counterclockwise
to overlap another angle. | public static double | interiorAngle(Coordinate p0, Coordinate p1, Coordinate p2) Computes the interior angle between two segments of a ring. | public static double | normalize(double angle) Computes the normalized value of an angle, which is the
equivalent angle lying between -Pi and Pi. | public static double | toDegrees(double radians) Converts from radians to degrees. | public static double | toRadians(double angleDegrees) Converts from degrees to radians. |
CLOCKWISE | public static int CLOCKWISE(Code) | | General constant representing clockwise orientation
|
COUNTERCLOCKWISE | public static int COUNTERCLOCKWISE(Code) | | General constant representing counterclockwise orientation
|
NONE | public static int NONE(Code) | | General constant representing no orientation
|
PI_OVER_2 | final public static double PI_OVER_2(Code) | | |
PI_OVER_4 | final public static double PI_OVER_4(Code) | | |
PI_TIMES_2 | final public static double PI_TIMES_2(Code) | | |
angle | public static double angle(Coordinate p0, Coordinate p1)(Code) | | Returns the angle of the vector from p0 to p1.
The angle will be between -Pi and Pi.
the angle (in radians) that p0-p1 makes with the positive x-axis. |
angle | public static double angle(Coordinate p)(Code) | | Returns the angle of the vector from (0,) to p.
The angle will be between -Pi and Pi.
the angle (in radians) that p makes with the positive x-axis. |
angleBetween | public static double angleBetween(Coordinate tail, Coordinate tip1, Coordinate tip2)(Code) | | Returns the angle between two vectors. Will be between 0 and Pi.
Parameters: tail - the tail of each vector Parameters: tip1 - the tip of one vector Parameters: tip2 - the tip of the other vector the angle between tail-tip1 and tail-tip2 |
diff | public static double diff(double a1, double a2)(Code) | | Returns the angle between two vectors.
Parameters: a1 - the angle of one vector, between -Pi and Pi Parameters: a2 - the angle of the other vector, between -Pi and Pi the angle (in radians) between the two vectors, between 0 and Pi |
getTurn | public static int getTurn(double a1, double a2)(Code) | | Returns whether an angle must turn clockwise or counterclockwise
to overlap another angle.
Parameters: a1 - an angle in radians Parameters: a2 - an angle in radians whether a1 must turn CLOCKWISE, COUNTERCLOCKWISE or NONE tooverlap a2. |
interiorAngle | public static double interiorAngle(Coordinate p0, Coordinate p1, Coordinate p2)(Code) | | Computes the interior angle between two segments of a ring.
The ring is assumed to be oriented in a clockwise direction.
Parameters: p0 - a point of the ring Parameters: p1 - the next point of the ring Parameters: p2 - the next point of the ring the interior angle based at p1 |
normalize | public static double normalize(double angle)(Code) | | Computes the normalized value of an angle, which is the
equivalent angle lying between -Pi and Pi.
Parameters: angle - the angle to compute the normalized value of the normalized value of the angle |
toDegrees | public static double toDegrees(double radians)(Code) | | Converts from radians to degrees.
Parameters: radians - an angle in radians the angle in degrees |
toRadians | public static double toRadians(double angleDegrees)(Code) | | Converts from degrees to radians.
Parameters: angleDegrees - an angle in degrees the angle in radians |
|
|