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

This commit is contained in:
Benjamin Nauck
2025-03-27 18:59:58 +01:00
parent 3253f2c2de
commit b625e81a3e
33 changed files with 204 additions and 168 deletions

View File

@@ -658,7 +658,7 @@ Py::Object View3DInventorPy::viewRotateLeft()
SbRotation rot = cam->orientation.getValue();
SbVec3f vdir(0, 0, -1);
rot.multVec(vdir, vdir);
SbRotation nrot(vdir, (float)M_PI/2);
SbRotation nrot(vdir, (float)std::numbers::pi/2);
cam->orientation.setValue(rot*nrot);
}
catch (const Base::Exception& e) {
@@ -681,7 +681,7 @@ Py::Object View3DInventorPy::viewRotateRight()
SbRotation rot = cam->orientation.getValue();
SbVec3f vdir(0, 0, -1);
rot.multVec(vdir, vdir);
SbRotation nrot(vdir, (float)-M_PI/2);
SbRotation nrot(vdir, (float)-std::numbers::pi/2);
cam->orientation.setValue(rot*nrot);
}
catch (const Base::Exception& e) {