diff --git a/src/Mod/PartDesign/App/DatumCS.cpp b/src/Mod/PartDesign/App/DatumCS.cpp index 05c7b4e17..591e32fc6 100644 --- a/src/Mod/PartDesign/App/DatumCS.cpp +++ b/src/Mod/PartDesign/App/DatumCS.cpp @@ -542,7 +542,7 @@ void CoordinateSystem::onChanged(const App::Property *prop) else if(line1) { if(line2) { - if(! ((lin1.Angle(lin2) - M_PI<2) < Precision::Angular()) ) + if(! (fabs(lin1.Angle(lin2) - M_PI/2.0) < Precision::Angular()) ) throw Base::Exception("Lines must be perpendicular"); ax = gp_Ax3(lin1.Location(), lin1.Direction(), lin2.Direction()); } @@ -608,4 +608,4 @@ Base::Vector3d CoordinateSystem::getZAxis() Base::Vector3d normal; rot.multVec(Base::Vector3d(0,0,1), normal); return normal; -} \ No newline at end of file +}