Use Base::toDegrees() instead of manually converting
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user