blob: c8a5d9cd03debc53aa4cfaeb912d776083052e0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--- a/src/Mod/TechDraw/Gui/CommandCreateDims.cpp
+++ b/src/Mod/TechDraw/Gui/CommandCreateDims.cpp
@@ -1103,7 +1103,7 @@
TechDraw::pointPair pp = dim->getLinearPoints();
float dx = pp.first().x - pp.second().x;
float dy = pp.first().y - pp.second().y;
- int alpha = std::round(Base::toDegrees(std::abs<float>(std::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 + "°";
--- a/src/Mod/TechDraw/Gui/CommandExtensionDims.cpp
+++ b/src/Mod/TechDraw/Gui/CommandExtensionDims.cpp
@@ -1984,7 +1984,7 @@
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 = std::round(Base::toDegrees(std::abs<float>(std::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 + "°";
@@ -2050,7 +2050,7 @@
dim->Y.setValue(-mid.y);
float dx = allVertexes[0].point.x - allVertexes[1].point.x;
float dy = allVertexes[0].point.y - allVertexes[1].point.y;
- float alpha = std::round(Base::toDegrees(std::abs<float>(std::atan(dx / dy))));
+ float alpha = std::round(Base::toDegrees(std::abs(std::atan(dx / dy))));
std::string sAlpha = std::to_string((int)alpha);
std::string formatSpec = dim->FormatSpec.getStrValue();
formatSpec = formatSpec + " x" + sAlpha + "°";
|