diff options
| author | Felix Dick <felix.dick@web.de> | 2022-09-29 14:24:59 +0200 |
|---|---|---|
| committer | Felix Dick <felix.dick@web.de> | 2022-09-29 14:24:59 +0200 |
| commit | 425b07d1e511d712d7920aecd6b5624845597242 (patch) | |
| tree | 12c5881b0319d093b54fab4f49479ac6701f40ce /src/helpers/MiscFunctions.cpp | |
| parent | 65fb526d5c3ef0bfab83f6fdc2e69270c4522448 (diff) | |
| parent | 2636abca2dcf1eca2c0296bb817f644b8626a860 (diff) | |
Merge branch 'main' into rework_rounding_shader
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
| -rw-r--r-- | src/helpers/MiscFunctions.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index b2f3a086..17e7a1a1 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -286,7 +286,7 @@ int getWorkspaceIDFromString(const std::string& in, std::string& outName) { if (PWORKSPACE) result = PWORKSPACE->m_iID; } - + outName = std::to_string(result); } } @@ -295,8 +295,8 @@ int getWorkspaceIDFromString(const std::string& in, std::string& outName) { } float vecToRectDistanceSquared(const Vector2D& vec, const Vector2D& p1, const Vector2D& p2) { - const float DX = std::max((double)0, std::max(p1.x - vec.x, vec.x - p2.x)); - const float DY = std::max((double)0, std::max(p1.y - vec.y, vec.y - p2.y)); + const float DX = std::max({0.0, p1.x - vec.x, vec.x - p2.x}); + const float DY = std::max({0.0, p1.y - vec.y, vec.y - p2.y}); return DX * DX + DY * DY; } |
