diff options
author | Vaxry <[email protected]> | 2024-12-16 18:31:07 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-12-16 18:31:07 +0000 |
commit | b9f82e9968efb2faad5ae50f806b033bbfa12549 (patch) | |
tree | a529707bb0a9b6c92ab8bc11672ebbd393e22348 /src/helpers/BezierCurve.cpp | |
parent | e06b520427a30f1c86562ad7cc3794bf03b40188 (diff) | |
download | Hyprland-b9f82e9968efb2faad5ae50f806b033bbfa12549.tar.gz Hyprland-b9f82e9968efb2faad5ae50f806b033bbfa12549.zip |
animationmgr: fixup stack-use-after-return
Diffstat (limited to 'src/helpers/BezierCurve.cpp')
-rw-r--r-- | src/helpers/BezierCurve.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/helpers/BezierCurve.cpp b/src/helpers/BezierCurve.cpp index ec093888..a0610fc9 100644 --- a/src/helpers/BezierCurve.cpp +++ b/src/helpers/BezierCurve.cpp @@ -43,14 +43,14 @@ void CBezierCurve::setup(std::vector<Vector2D>* pVec) { ELAPSEDUS, ELAPSEDCALCAVG); } -float CBezierCurve::getXForT(float const& t) { +float CBezierCurve::getXForT(float const& t) const { float t2 = t * t; float t3 = t2 * t; return 3 * t * (1 - t) * (1 - t) * m_vPoints[1].x + 3 * t2 * (1 - t) * m_vPoints[2].x + t3 * m_vPoints[3].x; } -float CBezierCurve::getYForT(float const& t) { +float CBezierCurve::getYForT(float const& t) const { float t2 = t * t; float t3 = t2 * t; @@ -58,7 +58,7 @@ float CBezierCurve::getYForT(float const& t) { } // Todo: this probably can be done better and faster -float CBezierCurve::getYForPoint(float const& x) { +float CBezierCurve::getYForPoint(float const& x) const { if (x >= 1.f) return 1.f; if (x <= 0.f) |