diff --git a/src/Mod/TechDraw/Gui/CommandCreateDims.cpp b/src/Mod/TechDraw/Gui/CommandCreateDims.cpp index 706fb80cd5..adf88262b2 100644 --- a/src/Mod/TechDraw/Gui/CommandCreateDims.cpp +++ b/src/Mod/TechDraw/Gui/CommandCreateDims.cpp @@ -23,6 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ +#include #include #include #include @@ -1140,7 +1141,7 @@ protected: TechDraw::pointPair pp = dim->getLinearPoints(); float dx = pp.first().x - pp.second().x; float dy = pp.first().y - pp.second().y; - int alpha = round(Base::toDegrees(abs(atan(type == "DistanceY" ? (dx / dy) : (dy / dx))))); + int alpha = std::round(Base::toDegrees(std::abs(std::atan(type == "DistanceY" ? (dx / dy) : (dy / dx))))); std::string sAlpha = std::to_string(alpha); std::string formatSpec = dim->FormatSpec.getStrValue(); formatSpec = formatSpec + " x" + sAlpha + "°"; diff --git a/src/Mod/TechDraw/Gui/CommandExtensionDims.cpp b/src/Mod/TechDraw/Gui/CommandExtensionDims.cpp index 6ddbda5f81..97c7ed3439 100644 --- a/src/Mod/TechDraw/Gui/CommandExtensionDims.cpp +++ b/src/Mod/TechDraw/Gui/CommandExtensionDims.cpp @@ -2063,7 +2063,7 @@ void execCreateHorizChamferDimension(Gui::Command* cmd) { dim->Y.setValue(-yMax); float dx = allVertexes[0].point.x - allVertexes[1].point.x; float dy = allVertexes[0].point.y - allVertexes[1].point.y; - float alpha = round(Base::toDegrees(abs(atan(dy / dx)))); + float alpha = std::round(Base::toDegrees(std::abs(std::atan(dy / dx)))); std::string sAlpha = std::to_string((int)alpha); std::string formatSpec = dim->FormatSpec.getStrValue(); formatSpec = formatSpec + " x" + sAlpha + "°";