mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-30 05:05:10 +00:00
LibWeb: Do not clamp the output of the cubic bezier timing function
It is fine for timing function to be outside of the range [0, 1] (cherry picked from commit 7925efda5fbc755b3fff00dcbba301fe4f8bc1c9)
This commit is contained in:
parent
ae4c5512af
commit
fa46393e27
|
@ -118,7 +118,7 @@ double CubicBezierTimingFunction::operator()(double input_progress, bool) const
|
|||
auto& sample1 = m_cached_x_samples[nearby_index];
|
||||
auto& sample2 = m_cached_x_samples[nearby_index + 1];
|
||||
auto factor = (x - sample1.x) / (sample2.x - sample1.x);
|
||||
return clamp(sample1.y + factor * (sample2.y - sample1.y), 0, 1);
|
||||
return sample1.y + factor * (sample2.y - sample1.y);
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/css-easing-1/#step-easing-algo
|
||||
|
|
Loading…
Reference in a new issue