19 #ifndef GEOS_ALGORITHM_ANGLE_H
20 #define GEOS_ALGORITHM_ANGLE_H
22 #include <geos/export.h>
23 #include <geos/algorithm/Orientation.h>
42 static const double PI_TIMES_2;
43 static const double PI_OVER_2;
44 static const double PI_OVER_4;
47 static const int COUNTERCLOCKWISE = Orientation::COUNTERCLOCKWISE;
50 static const int CLOCKWISE = Orientation::CLOCKWISE;
53 static const int NONE = Orientation::COLLINEAR;
219 static double diff(
double ang1,
double ang2);
227 #endif // GEOS_ALGORITHM_ANGLE_H
static bool isAcute(const geom::Coordinate &p0, const geom::Coordinate &p1, const geom::Coordinate &p2)
Tests whether the angle between p0-p1-p2 is acute.
static double toRadians(double angleDegrees)
Converts from degrees to radians.
static double angle(const geom::Coordinate &p0, const geom::Coordinate &p1)
Returns the angle of the vector from p0 to p1, relative to the positive X-axis.
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
static int getTurn(double ang1, double ang2)
Returns whether an angle must turn clockwise or counterclockwise to overlap another angle.
static double angle(const geom::Coordinate &p)
Returns the angle that the vector from (0,0) to p, relative to the positive X-axis.
static double interiorAngle(const geom::Coordinate &p0, const geom::Coordinate &p1, const geom::Coordinate &p2)
Computes the interior angle between two segments of a ring.
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:84
static bool isObtuse(const geom::Coordinate &p0, const geom::Coordinate &p1, const geom::Coordinate &p2)
Tests whether the angle between p0-p1-p2 is obtuse.
Utility functions for working with angles.
Definition: Angle.h:39
static double normalizePositive(double angle)
Computes the normalized positive value of an angle, which is the equivalent angle in the range [ 0,...
static double angleBetweenOriented(const geom::Coordinate &tip1, const geom::Coordinate &tail, const geom::Coordinate &tip2)
Returns the oriented smallest angle between two vectors.
static double angleBetween(const geom::Coordinate &tip1, const geom::Coordinate &tail, const geom::Coordinate &tip2)
Returns the unoriented smallest angle between two vectors.
static double normalize(double angle)
Computes the normalized value of an angle, which is the equivalent angle in the range ( -Pi,...
static double diff(double ang1, double ang2)
Computes the unoriented smallest difference between two angles.
static double toDegrees(double radians)
Converts from radians to degrees.