Measure: Use std::numeric_limits and std::numbers instead of defines
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#ifdef _PreComp_
|
||||
|
||||
// standard
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
|
||||
// STL
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
#ifdef _PreComp_
|
||||
|
||||
// standard
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
|
||||
// STL
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user