|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object math.geom2d.Angle2D
public class Angle2D
This class is only devoted to static computations.
Field Summary | |
---|---|
static double |
M_2PI
The constant for 2*PI, equivalent to 360 degrees. |
static double |
M_3PI_2
The constant for 3*PI/2, equivalent to 270 degrees. |
static double |
M_PI
The constant for PI, equivalent to 180 degrees. |
static double |
M_PI_2
The constant for PI/2, equivalent to 90 degrees. |
static double |
M_PI_4
The constant for 3*PI/4, equivalent to 45 degrees. |
Constructor Summary | |
---|---|
Angle2D()
|
Method Summary | |
---|---|
static double |
absoluteAngle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Returns the absolute angle between the ray formed by (p2, p1) and the ray formed by (p2, p3), where pi = (xi,yi), i=1,2,3. |
static double |
absoluteAngle(Point2D p1,
Point2D p2,
Point2D p3)
Returns the absolute angle between the ray formed by (p2, p1) and the ray formed by (p2, p3). |
static boolean |
almostEquals(double angle1,
double angle2,
double eps)
Checks whether two angles are equal, with respect to the given error bound. |
static double |
angle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Returns the oriented angle between the ray formed by (p2, p1) and the ray formed by (p2, p3), where pi = (xi,yi), i=1,2,3. |
static double |
angle(LinearShape2D obj1,
LinearShape2D obj2)
Returns the oriented angle between two (directed) straight objects. |
static double |
angle(Point2D p1,
Point2D p2,
Point2D p3)
Returns the oriented angle between the ray formed by (p2, p1) and the ray formed by (p2, p3). |
static double |
angle(Vector2D vect1,
Vector2D vect2)
Returns the oriented angle between two vectors. |
static boolean |
containsAngle(double startAngle,
double endAngle,
double angle)
Tests if an angle belongs to an angular interval, defined by two limit angle, counted Counter-clockwise. |
static boolean |
containsAngle(double startAngle,
double endAngle,
double angle,
boolean direct)
Tests if an angle belongs to an angular interval, defined by two limit angles, and an orientation flag. |
static boolean |
equals(double angle1,
double angle2)
Checks whether two angles are equal, given a default threshold value. |
static double |
formatAngle(double angle)
Formats an angle between 0 and 2*PI. |
static double |
horizontalAngle(double x,
double y)
Returns the horizontal angle formed by the line joining the origin and the point with given coordinate. |
static double |
horizontalAngle(double x1,
double y1,
double x2,
double y2)
Returns the horizontal angle formed by the line joining the two given points. |
static double |
horizontalAngle(LinearShape2D object)
Returns the horizontal angle formed by the line joining the two given points. |
static double |
horizontalAngle(Point2D point)
Returns the horizontal angle formed by the line joining the origin and the given point. |
static double |
horizontalAngle(Point2D p1,
Point2D p2)
Returns the horizontal angle formed by the line joining the two given points. |
static double |
horizontalAngle(Vector2D vect)
Returns the horizontal angle formed by the line joining the origin and the point with given coordinate. |
static double |
pseudoAngle(Point2D p1,
Point2D p2)
Computes the pseudo-angle of a line joining the 2 points. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double M_PI
public static final double M_2PI
public static final double M_PI_2
public static final double M_3PI_2
public static final double M_PI_4
Constructor Detail |
---|
public Angle2D()
Method Detail |
---|
public static double formatAngle(double angle)
angle
- the angle before formatting
public static double horizontalAngle(Point2D point)
public static double horizontalAngle(double x, double y)
public static double horizontalAngle(Vector2D vect)
public static double horizontalAngle(LinearShape2D object)
public static double horizontalAngle(Point2D p1, Point2D p2)
public static double horizontalAngle(double x1, double y1, double x2, double y2)
public static double pseudoAngle(Point2D p1, Point2D p2)
Computes the pseudo-angle of a line joining the 2 points. The pseudo-angle has same ordering property has natural angle, but is expected to be computed faster. The result is given between 0 and 360.
p1
- the initial pointp2
- the final point
public static double angle(LinearShape2D obj1, LinearShape2D obj2)
public static double angle(Vector2D vect1, Vector2D vect2)
public static double angle(Point2D p1, Point2D p2, Point2D p3)
public static double angle(double x1, double y1, double x2, double y2, double x3, double y3)
public static double absoluteAngle(Point2D p1, Point2D p2, Point2D p3)
public static double absoluteAngle(double x1, double y1, double x2, double y2, double x3, double y3)
public static boolean almostEquals(double angle1, double angle2, double eps)
angle1
- first angle to compareangle2
- second angle to compareeps
- the threshold value for comparison
public static boolean equals(double angle1, double angle2)
angle1
- first angle to compareangle2
- second angle to compare
public static boolean containsAngle(double startAngle, double endAngle, double angle)
startAngle
- the beginning of the angular domainendAngle
- the end of the angular domainangle
- the angle to test
public static boolean containsAngle(double startAngle, double endAngle, double angle, boolean direct)
startAngle
- the beginning of the angular domainendAngle
- the end of the angular domainangle
- the angle to testdirect
- is true if angular domain is oriented Counter clockwise, and
false if angular domain is oriented clockwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |