Use Base::toDegrees() instead of manually converting

This commit is contained in:
Benjamin Nauck
2025-04-09 09:52:39 +02:00
parent 21fbf8e539
commit f22f3705db
17 changed files with 38 additions and 37 deletions

View File

@@ -752,9 +752,9 @@ void Rotation::getYawPitchRoll(double& y, double& p, double& r) const
}
// convert to degree
y = (y / pi) * 180;
p = (p / pi) * 180;
r = (r / pi) * 180;
y = toDegrees(y);
p = toDegrees(p);
r = toDegrees(r);
}
bool Rotation::isSame(const Rotation& q) const
@@ -1092,7 +1092,7 @@ void Rotation::getEulerAngles(EulerSequence theOrder,
theGamma = aFirst;
}
theAlpha *= 180.0 / std::numbers::pi;
theBeta *= 180.0 / std::numbers::pi;
theGamma *= 180.0 / std::numbers::pi;
theAlpha = Base::toDegrees(theAlpha);
theBeta = Base::toDegrees(theBeta);
theGamma = Base::toDegrees(theGamma);
}