forked from AGL/AGL_Simple_Impl
Remove TODO & add explanation
This commit is contained in:
parent
4adb0cfda7
commit
d3a1ffbef1
|
@ -133,10 +133,11 @@ impl AglApi for GraphicsRenderer {
|
|||
}
|
||||
}
|
||||
|
||||
/// Interpolate between two colors according to a factor.
|
||||
/// Linearly interpolate between two colors according to a factor.
|
||||
/// This method is cheap, perfectly accurate for shades of gray, and
|
||||
/// reasonably accurate for other colors; if better results are
|
||||
/// needed, LCH interpolation should be used instead.
|
||||
fn lerp_rgba(a: RGBA, b: RGBA, fac: f32) -> RGBA {
|
||||
// TODO: This is probably the wrong way to mix colors, but it's
|
||||
// simple and works for now.
|
||||
RGBA {
|
||||
r: ((b.r as f32 - a.r as f32) * fac + a.r as f32) as _,
|
||||
g: ((b.g as f32 - a.g as f32) * fac + a.g as f32) as _,
|
||||
|
|
Loading…
Reference in a new issue