Add gfx::lerp for uint8 colors
This commit is contained in:
parent
66a72b89bd
commit
40324d6db9
1 changed files with 6 additions and 0 deletions
|
|
@ -29,4 +29,10 @@ namespace psemek::gfx
|
|||
return r;
|
||||
}
|
||||
|
||||
template <std::size_t N>
|
||||
auto lerp(geom::vector<std::uint8_t, N> const & c0, geom::vector<std::uint8_t, N> const & c1, float t)
|
||||
{
|
||||
return to_coloru8(geom::lerp(to_colorf(c0), to_colorf(c1), t));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue