Hi,
The "C++20 is now allowed in Chromium" email says "we are allowing a significant number of features immediately [...]: std::lerp and std::midpoint".
Is there a discussion of these particular functions that I could read?
It is my (surface-level) understanding that std::lerp is kind of the std::unordered_map of lerps: Specced to behave well on all kinds of corner cases, but that also means the implementation is more complex (and slower) than the `a + (b - a) * x` (or `a * x + b * (1 - x)`? :P) you often want.
Sometimes we want all the corner case handling, but often we don't.
Maybe it makes sense to have a recommendation similar to std::unordered_map, along the lines of "don't default to std::lerp"?
Often it won't matter either way, but the C++20 email suggested animation systems where we might call the interpolation function often, and for many values.
Nico
1: Vaguely lerp-shaded code snippets, often just inline: