Gui: Use std::numeric_limits and std::numbers instead of defines
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user