mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-21 15:03:50 -07:00
Up the bezier bake count
This commit is contained in:
@@ -61,8 +61,8 @@ float CBezierCurve::getYForPoint(float x) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// in the name of performance i shall make a hack
|
// in the name of performance i shall make a hack
|
||||||
const auto LOWERPOINT = &m_aPointsBaked[std::clamp((int)((float)BAKEDPOINTS * lowerT), 0, 199)];
|
const auto LOWERPOINT = &m_aPointsBaked[std::clamp((int)((float)BAKEDPOINTS * lowerT), 0, BAKEDPOINTS - 1)];
|
||||||
const auto UPPERPOINT = &m_aPointsBaked[std::clamp((int)((float)BAKEDPOINTS * upperT), 0, 199)];
|
const auto UPPERPOINT = &m_aPointsBaked[std::clamp((int)((float)BAKEDPOINTS * upperT), 0, BAKEDPOINTS - 1)];
|
||||||
|
|
||||||
const auto PERCINDELTA = (x - LOWERPOINT->x) / (UPPERPOINT->x - LOWERPOINT->x);
|
const auto PERCINDELTA = (x - LOWERPOINT->x) / (UPPERPOINT->x - LOWERPOINT->x);
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
#include "../defines.hpp"
|
#include "../defines.hpp"
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
constexpr int BAKEDPOINTS = 200;
|
constexpr int BAKEDPOINTS = 255;
|
||||||
constexpr float INVBAKEDPOINTS = 1.f / BAKEDPOINTS;
|
constexpr float INVBAKEDPOINTS = 1.f / BAKEDPOINTS;
|
||||||
|
|
||||||
// an implementation of a cubic bezier curve
|
// an implementation of a cubic bezier curve
|
||||||
|
Reference in New Issue
Block a user