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

This commit is contained in:
Benjamin Nauck
2025-03-27 18:59:37 +01:00
parent c77de32b78
commit 3253f2c2de
18 changed files with 97 additions and 140 deletions

View File

@@ -99,7 +99,8 @@ int PlacementPy::PyInit(PyObject* args, PyObject* /*kwd*/)
&angle)) {
// NOTE: The first parameter defines the translation, the second the rotation axis
// and the last parameter defines the rotation angle in degree.
Base::Rotation rot(static_cast<Base::VectorPy*>(d)->value(), angle / 180.0 * D_PI);
Base::Rotation rot(static_cast<Base::VectorPy*>(d)->value(),
angle / 180.0 * std::numbers::pi);
*getPlacementPtr() = Base::Placement(static_cast<Base::VectorPy*>(o)->value(), rot);
return 0;
}