common/bezier: fix a wrong computation.

the value should be normalized.
This commit is contained in:
Hermet Park 2023-08-29 19:28:45 +09:00
parent 86467481d1
commit 309f355c60

View file

@ -116,7 +116,7 @@ float bezAt(const Bezier& bz, float at, float length)
//just in case to prevent an infinite loop
if (at <= 0) return 0.0f;
if (at >= length) return length;
if (at >= length) return 1.0f;
while (true) {
auto right = bz;