|
||||||||||
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
|
static double |
M_3PI_2
|
static double |
M_PI
|
static double |
M_PI_2
|
static double |
M_PI_4
|
Constructor Summary | |
---|---|
Angle2D()
|
Method Summary | |
---|---|
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 angle, and an orientation flag. |
static boolean |
equals(double angle1,
double angle2)
Checks whether two angles are equal. |
static double |
formatAngle(double angle)
Formats an angle between 0 and 2*PI. |
static double |
getAbsoluteAngle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Gets 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 |
getAbsoluteAngle(Point2D p1,
Point2D p2,
Point2D p3)
Gets the absolute angle between the ray formed by (p2, p1) and the ray formed by (p2, p3). |
static double |
getAngle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Gets the 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 |
getAngle(LinearShape2D obj1,
LinearShape2D obj2)
Gets angle between two (directed) straight objects. |
static double |
getAngle(Point2D p1,
Point2D p2,
Point2D p3)
Gets the angle between the ray formed by (p2, p1) and the ray formed by (p2, p3). |
static double |
getAngle(Vector2D vect1,
Vector2D vect2)
Gets angle between two vectors. |
static double |
getHorizontalAngle(double x,
double y)
Returns the horizontal angle formed by the line joining the origin and the point with given coordinate. |
static double |
getHorizontalAngle(double x1,
double y1,
double x2,
double y2)
Returns the horizontal angle formed by the line joining the two given points. |
static double |
getHorizontalAngle(LinearShape2D object)
Returns the horizontal angle formed by the line joining the two given points. |
static double |
getHorizontalAngle(Point2D point)
Returns the horizontal angle formed by the line joining the origin and the given point. |
static double |
getHorizontalAngle(Point2D p1,
Point2D p2)
Returns the horizontal angle formed by the line joining the two given points. |
static double |
getHorizontalAngle(Vector2D vect)
Returns the horizontal angle formed by the line joining the origin and the point with given coordinate. |
static double |
getPseudoAngle(Point2D p1,
Point2D p2)
Computes the pseudo-angle of a line joining the 2 points. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, 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 final double formatAngle(double angle)
angle
- the angle before formatting
public static final double getHorizontalAngle(Point2D point)
public static final double getHorizontalAngle(double x, double y)
public static final double getHorizontalAngle(Vector2D vect)
public static final double getHorizontalAngle(LinearShape2D object)
public static final double getHorizontalAngle(Point2D p1, Point2D p2)
public static final double getHorizontalAngle(double x1, double y1, double x2, double y2)
public static final double getPseudoAngle(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 final double getAngle(LinearShape2D obj1, LinearShape2D obj2)
public static final double getAngle(Vector2D vect1, Vector2D vect2)
public static final double getAngle(Point2D p1, Point2D p2, Point2D p3)
public static final double getAngle(double x1, double y1, double x2, double y2, double x3, double y3)
public static final double getAbsoluteAngle(Point2D p1, Point2D p2, Point2D p3)
public static final double getAbsoluteAngle(double x1, double y1, double x2, double y2, double x3, double y3)
public static final boolean equals(double angle1, double angle2)
angle1
- first angle to compareangle2
- second angle to compare
public static final 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 final 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 |