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

This commit is contained in:
Benjamin Nauck
2025-03-27 19:01:53 +01:00
parent 075a1362ed
commit c2e885d774
16 changed files with 47 additions and 38 deletions

View File

@@ -244,7 +244,7 @@ App::DocumentObjectExecReturn *Draft::execute()
if (c.GetType() != GeomAbs_Line)
throw Base::TypeError("Neutral plane reference edge must be linear");
double a = c.Line().Angle(gp_Lin(c.Value(c.FirstParameter()), pullDirection));
if (std::fabs(a - M_PI_2) > Precision::Confusion())
if (std::fabs(a - std::numbers::pi/2) > Precision::Confusion())
throw Base::ValueError("Neutral plane reference edge must be normal to pull direction");
neutralPlane = gp_Pln(c.Value(c.FirstParameter()), pullDirection);
} else {