diff options
Diffstat (limited to 'src/helpers/math')
| -rw-r--r-- | src/helpers/math/Math.cpp | 4 | ||||
| -rw-r--r-- | src/helpers/math/Math.hpp | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/helpers/math/Math.cpp b/src/helpers/math/Math.cpp index f927701c..0f7a5d14 100644 --- a/src/helpers/math/Math.cpp +++ b/src/helpers/math/Math.cpp @@ -1,7 +1,7 @@ #include "Math.hpp" #include "../memory/Memory.hpp" -Hyprutils::Math::eTransform wlTransformToHyprutils(wl_output_transform t) { +Hyprutils::Math::eTransform Math::wlTransformToHyprutils(wl_output_transform t) { switch (t) { case WL_OUTPUT_TRANSFORM_NORMAL: return Hyprutils::Math::eTransform::HYPRUTILS_TRANSFORM_NORMAL; case WL_OUTPUT_TRANSFORM_180: return Hyprutils::Math::eTransform::HYPRUTILS_TRANSFORM_180; @@ -16,7 +16,7 @@ Hyprutils::Math::eTransform wlTransformToHyprutils(wl_output_transform t) { return Hyprutils::Math::eTransform::HYPRUTILS_TRANSFORM_NORMAL; } -wl_output_transform invertTransform(wl_output_transform tr) { +wl_output_transform Math::invertTransform(wl_output_transform tr) { if ((tr & WL_OUTPUT_TRANSFORM_90) && !(tr & WL_OUTPUT_TRANSFORM_FLIPPED)) tr = sc<wl_output_transform>(tr ^ sc<int>(WL_OUTPUT_TRANSFORM_180)); diff --git a/src/helpers/math/Math.hpp b/src/helpers/math/Math.hpp index 367d8190..c4baba3c 100644 --- a/src/helpers/math/Math.hpp +++ b/src/helpers/math/Math.hpp @@ -9,5 +9,9 @@ // NOLINTNEXTLINE using namespace Hyprutils::Math; -eTransform wlTransformToHyprutils(wl_output_transform t); -wl_output_transform invertTransform(wl_output_transform tr); +namespace Math { + constexpr const Vector2D VECTOR2D_MAX = {std::numeric_limits<double>::max(), std::numeric_limits<double>::max()}; + + eTransform wlTransformToHyprutils(wl_output_transform t); + wl_output_transform invertTransform(wl_output_transform tr); +} |
