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

This commit is contained in:
Benjamin Nauck
2025-03-27 19:01:17 +01:00
parent 42e219a9fd
commit bc462c44cc
4 changed files with 2 additions and 4 deletions

View File

@@ -108,7 +108,7 @@ bool MeasureAngle::isPrioritizedSelection(const App::MeasureSelection& selection
getVec(*ob2, sub2, vec2);
double angle = std::fmod(vec1.GetAngle(vec2), D_PI);
double angle = std::fmod(vec1.GetAngle(vec2), std::numbers::pi);
return angle > Base::Precision::Angular();
}

View File

@@ -30,7 +30,6 @@
#ifdef _PreComp_
// standard
#include <cfloat>
#include <cmath>
// STL

View File

@@ -44,7 +44,6 @@
#ifdef _PreComp_
// standard
#include <cfloat>
#include <cmath>
// STL

View File

@@ -325,7 +325,7 @@ void ViewProviderMeasureAngle::redrawAnnotation()
{
auto obj = dynamic_cast<Measure::MeasureAngle*>(getMeasureObject());
double angleDeg = obj->Angle.getValue();
constexpr double radiansPerDegree = M_PI / 180.0;
constexpr double radiansPerDegree = std::numbers::pi / 180.0;
this->fieldAngle = angleDeg * radiansPerDegree;
// Set matrix