42 #define M_PI 3.1415926535897932384626433832795 45 #define DEG2RAD(x) static_cast<double>((x) * M_PI / 180.) 46 #define RAD2DEG(x) static_cast<double>((x) * 180. / M_PI) 71 std::vector<double>& into);
82 const Position& p,
bool perpendicular =
true);
120 static double angleDiff(
const double angle1,
const double angle2);
137 static double legacyDegree(
const double angle,
const bool positive =
false);
static double getMinAngleDiff(double angle1, double angle2)
Returns the minimum distance (clockwise/counter-clockwise) between both angles.
static double getCCWAngleDiff(double angle1, double angle2)
Returns the distance of second angle from first angle counter-clockwise.
static Position crossPoint(const Boundary &b, const PositionVector &v)
A class that stores a 2D geometrical boundary.
static double legacyDegree(const double angle, const bool positive=false)
static double naviDegree(const double angle)
static double nearest_offset_on_line_to_point2D(const Position &lineStart, const Position &lineEnd, const Position &p, bool perpendicular=true)
Some static methods performing geometrical operations.
A point in 2D or 3D with translation and scaling methods.
static double getCWAngleDiff(double angle1, double angle2)
Returns the distance of second angle from first angle clockwise.
static double angle2D(const Position &p1, const Position &p2)
Returns the angle between two vectors on a plane The angle is from vector 1 to vector 2...
static const double INVALID_OFFSET
a value to signify offsets outside the range of [0, Line.length()]
static void findLineCircleIntersections(const Position &c, double radius, const Position &p1, const Position &p2, std::vector< double > &into)
Returns the positions the given circle is crossed by the given line.
static double angleDiff(const double angle1, const double angle2)
Returns the difference of the second angle to the first angle in radiants.