mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +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
1 changed files with 1 additions and 2 deletions
|
@ -176,8 +176,7 @@ public:
|
||||||
--i;
|
--i;
|
||||||
|
|
||||||
float f = x * (values().size() - 1) - i;
|
float f = x * (values().size() - 1) - i;
|
||||||
|
return mix(values()[i] / 65535.f, values()[i + 1] / 65535.f, f);
|
||||||
return (1 - f) * (values()[i] / 65535.f) + f * (values()[i + 1] / 65535.f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue