public class Angle
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
static int | 
CLOCKWISE
General constant representing clockwise orientation 
 | 
static int | 
COUNTERCLOCKWISE
General constant representing counterclockwise orientation 
 | 
static int | 
NONE
General constant representing no orientation 
 | 
static double | 
PI_OVER_2  | 
static double | 
PI_OVER_4  | 
static double | 
PI_TIMES_2  | 
| Constructor and Description | 
|---|
Angle()  | 
| Modifier and Type | Method and Description | 
|---|---|
static double | 
angle(com.vividsolutions.jts.geom.Coordinate p)
Returns the angle of the vector from (0,) to p. 
 | 
static double | 
angle(com.vividsolutions.jts.geom.Coordinate p0,
     com.vividsolutions.jts.geom.Coordinate p1)
Returns the angle of the vector from p0 to p1. 
 | 
static double | 
angleBetween(com.vividsolutions.jts.geom.Coordinate tail,
            com.vividsolutions.jts.geom.Coordinate tip1,
            com.vividsolutions.jts.geom.Coordinate tip2)
Returns the angle between two vectors. 
 | 
static double | 
diff(double a1,
    double a2)
Returns the angle between two vectors. 
 | 
static int | 
getTurn(double a1,
       double a2)
Returns whether an angle must turn clockwise or counterclockwise
 to overlap another angle. 
 | 
static double | 
interiorAngle(com.vividsolutions.jts.geom.Coordinate p0,
             com.vividsolutions.jts.geom.Coordinate p1,
             com.vividsolutions.jts.geom.Coordinate p2)
Computes the interior angle between two segments of a ring. 
 | 
static double | 
normalize(double angle)
Computes the normalized value of an angle, which is the
 equivalent angle lying between -Pi and Pi. 
 | 
static double | 
toDegrees(double radians)
Converts from radians to degrees. 
 | 
static double | 
toRadians(double angleDegrees)
Converts from degrees to radians. 
 | 
public static final double PI_TIMES_2
public static final double PI_OVER_2
public static final double PI_OVER_4
public static int COUNTERCLOCKWISE
public static int CLOCKWISE
public static int NONE
public static double toDegrees(double radians)
radians - an angle in radianspublic static double angle(com.vividsolutions.jts.geom.Coordinate p0,
           com.vividsolutions.jts.geom.Coordinate p1)
public static double angle(com.vividsolutions.jts.geom.Coordinate p)
public static double toRadians(double angleDegrees)
angleDegrees - an angle in degreespublic static double angleBetween(com.vividsolutions.jts.geom.Coordinate tail,
                  com.vividsolutions.jts.geom.Coordinate tip1,
                  com.vividsolutions.jts.geom.Coordinate tip2)
tail - the tail of each vectortip1 - the tip of one vectortip2 - the tip of the other vectorpublic static double interiorAngle(com.vividsolutions.jts.geom.Coordinate p0,
                   com.vividsolutions.jts.geom.Coordinate p1,
                   com.vividsolutions.jts.geom.Coordinate p2)
p0 - a point of the ringp1 - the next point of the ringp2 - the next point of the ringp1public static int getTurn(double a1,
          double a2)
a1 - an angle in radiansa2 - an angle in radianspublic static double normalize(double angle)
angle - the angle to compute the normalized value ofpublic static double diff(double a1,
          double a2)
a1 - the angle of one vector, between -Pi and Pia2 - the angle of the other vector, between -Pi and Pi