12 inline void rot2D(
double &rotX,
double &rotY,
double x,
double y,
double ang) {
13 double sinAng =
sind(ang);
14 double cosAng =
cosd(ang);
16 rotX = cosAng * x - sinAng * y;
17 rotY = sinAng * x + cosAng * y;
22 double wrappedAng = std::fmod(ang, 360);
26 if (wrappedAng == 360) {
35 double wrappedAng = std::fmod(ang, 360);
36 if (wrappedAng >= 180) {
38 if (wrappedAng < -180) {
42 }
else if (wrappedAng < -180) {
44 if (wrappedAng >= 180) {
52 inline double wrapNear(
double ang,
double refAng) {
53 double wrappedAng = refAng +
wrapCtr(ang - refAng);
57 if (wrappedAng - refAng >= 180) {
62 if (wrappedAng - refAng < -180) {
double wrapNear(double ang, double refAng)
double cosd(double ang)
cosine of angle in degrees
double wrapCtr(double ang)
const double DoubleEpsilon
double sind(double ang)
sine of angle in degrees
void rot2D(double &rotX, double &rotY, double x, double y, double ang)
double wrapPos(double ang)