mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 22:35:45 +00:00
use well known order of lerp arguments
This commit is contained in:
parent
a3c8d375c2
commit
82ce34dea3
3 changed files with 5 additions and 5 deletions
4
utils.hh
4
utils.hh
|
|
@ -16,8 +16,8 @@ int signum(TYPE v)
|
|||
return (v > TYPE(0)) - (v < TYPE(0));
|
||||
}
|
||||
|
||||
template <typename X, typename AB>
|
||||
AB lerp(X x, AB a, AB b)
|
||||
template <typename AB, typename X>
|
||||
AB lerp(AB a, AB b, X x)
|
||||
{
|
||||
return (X(1) - x) * a + x * b;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue