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

@@ -378,6 +378,7 @@ Base::Vector3d Transform::getDirection() const
Base::Placement Transform::getPlacementData() const
{
using std::numbers::pi;
int index = ui->rotationInput->currentIndex();
Base::Rotation rot;
Base::Vector3d pos;
@@ -388,7 +389,7 @@ Base::Placement Transform::getPlacementData() const
if (index == 0) {
Base::Vector3d dir = getDirection();
rot.setValue(Base::Vector3d(dir.x,dir.y,dir.z),ui->angle->value().getValue()*D_PI/180.0);
rot.setValue(Base::Vector3d(dir.x,dir.y,dir.z),ui->angle->value().getValue()*pi/180.0);
}
else if (index == 1) {
rot.setYawPitchRoll(