diff options
author | Vaxry <[email protected]> | 2024-06-21 15:56:25 +0200 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-06-21 19:20:15 +0200 |
commit | 8cf2ca196620bc4431cbab83bfa25314e1e80ad7 (patch) | |
tree | 002a2ecfc3bda41edf0d7cc598ace36eaf8df129 | |
parent | fabc30df52ab5d2c369fc8acd4ff909a6ba3b8ac (diff) | |
download | Hyprland-8cf2ca196620bc4431cbab83bfa25314e1e80ad7.tar.gz Hyprland-8cf2ca196620bc4431cbab83bfa25314e1e80ad7.zip |
math: include cstring for memset
fixup name too
-rw-r--r-- | src/helpers/math/Math.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/helpers/math/Math.cpp b/src/helpers/math/Math.cpp index df4f1bb5..560f29c9 100644 --- a/src/helpers/math/Math.cpp +++ b/src/helpers/math/Math.cpp @@ -1,5 +1,6 @@ #include "Math.hpp" #include <unordered_map> +#include <cstring> Hyprutils::Math::eTransform wlTransformToHyprutils(wl_output_transform t) { switch (t) { @@ -52,21 +53,21 @@ static void matrixTranslate(float mat[9], float x, float y) { float translate[9] = { 1.0f, 0.0f, x, 0.0f, 1.0f, y, 0.0f, 0.0f, 1.0f, }; - wlr_matrix_multiply(mat, mat, translate); + matrixMultiply(mat, mat, translate); } static void matrixScale(float mat[9], float x, float y) { float scale[9] = { x, 0.0f, 0.0f, 0.0f, y, 0.0f, 0.0f, 0.0f, 1.0f, }; - wlr_matrix_multiply(mat, mat, scale); + matrixMultiply(mat, mat, scale); } static void matrixRotate(float mat[9], float rad) { float rotate[9] = { cos(rad), -sin(rad), 0.0f, sin(rad), cos(rad), 0.0f, 0.0f, 0.0f, 1.0f, }; - wlr_matrix_multiply(mat, mat, rotate); + matrixMultiply(mat, mat, rotate); } static std::unordered_map<eTransform, std::array<float, 9>> transforms = { @@ -208,7 +209,7 @@ void projectBox(float mat[9], CBox& box, eTransform transform, float rotation, c matrixTranslate(mat, -width / 2, -height / 2); } - wlr_matrix_scale(mat, width, height); + matrixScale(mat, width, height); if (transform != HYPRUTILS_TRANSFORM_NORMAL) { matrixTranslate(mat, 0.5, 0.5); |