Techdraw: Use std::numeric_limits and std::numbers instead of defines

This commit is contained in:
Benjamin Nauck
2025-03-27 19:02:45 +01:00
parent 41756a3726
commit cf94011294
40 changed files with 243 additions and 220 deletions

View File

@@ -402,9 +402,9 @@ double QGISectionLine::getArrowRotation(Base::Vector3d arrowDir)
arrowDir.Normalize();
double angle = atan2f(arrowDir.y, arrowDir.x);
if (angle < 0.0) {
angle = 2 * M_PI + angle;
angle = 2 * std::numbers::pi + angle;
}
double arrowRotation = 360.0 - angle * (180.0/M_PI); //convert to Qt rotation (clockwise degrees)
double arrowRotation = 360.0 - angle * (180.0/std::numbers::pi); //convert to Qt rotation (clockwise degrees)
return arrowRotation;
}