mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibGfx/ICC: Use mix() in CurveTagData::evaluate()
No behavior change. (Well, technically mix() uses the other simple implementation of lerp and the two have slightly different behavior if the arguments are of very different magnitude and in various corner cases. But in practice, for ICC profiles, it shouldn't matter. For a few profiles I tested, it didn't have a measurable effect.)
This commit is contained in:
parent
077164ae15
commit
93f5a6f217
Notes:
sideshowbarker
2024-07-17 06:46:15 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/93f5a6f217 Pull-request: https://github.com/SerenityOS/serenity/pull/18322 Reviewed-by: https://github.com/linusg
|
@ -176,8 +176,7 @@ public:
|
|||
--i;
|
||||
|
||||
float f = x * (values().size() - 1) - i;
|
||||
|
||||
return (1 - f) * (values()[i] / 65535.f) + f * (values()[i + 1] / 65535.f);
|
||||
return mix(values()[i] / 65535.f, values()[i + 1] / 65535.f, f);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue