Sketcher: Use std::numeric_limits and std::numbers instead of defines
This commit is contained in:
@@ -591,7 +591,7 @@ void SketchAnalysis::analyseMissingPointOnPointCoincident(double angleprecision)
|
||||
if (fabs(tgv1 * tgv2) > fabs(cos(angleprecision))) {
|
||||
vc.Type = Sketcher::Tangent;
|
||||
}
|
||||
else if (fabs(tgv1 * tgv2) < fabs(cos(M_PI / 2 - angleprecision))) {
|
||||
else if (fabs(tgv1 * tgv2) < fabs(cos(std::numbers::pi / 2 - angleprecision))) {
|
||||
vc.Type = Sketcher::Perpendicular;
|
||||
}
|
||||
}
|
||||
@@ -726,7 +726,8 @@ void SketchAnalysis::makeMissingVerticalHorizontalOneByOne()
|
||||
|
||||
bool SketchAnalysis::checkVertical(Base::Vector3d dir, double angleprecision)
|
||||
{
|
||||
return (dir.x == 0. && dir.y != 0.) || (fabs(dir.y / dir.x) > tan(M_PI / 2 - angleprecision));
|
||||
return (dir.x == 0. && dir.y != 0.)
|
||||
|| (fabs(dir.y / dir.x) > tan(std::numbers::pi / 2 - angleprecision));
|
||||
}
|
||||
|
||||
bool SketchAnalysis::checkHorizontal(Base::Vector3d dir, double angleprecision)
|
||||
|
||||
Reference in New Issue
Block a user