diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-26 13:48:58 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-26 13:48:58 -0400 |
commit | 8a6da4d6210192ada4a26ddd397c00d78b08dfcc (patch) | |
tree | b54e474b526128540c824610c43a1a6e6e206c10 /indra/llmath/llmath.h | |
parent | 452e07489b95e8ba60bf585878f9c0ed8e13b5e3 (diff) |
Rename our lerp() to flerp(); call where MSVC balks at std::lerp().
Now the lerp() in global namespace is std::lerp(), but it remains true that
for some calls to std::lerp(), MSVC issues fatal argument conversion warnings.
In those places, call flerp() (our historic lerp()) instead.
Diffstat (limited to 'indra/llmath/llmath.h')
-rw-r--r-- | indra/llmath/llmath.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 75284ef57e..1d6d986207 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -358,11 +358,11 @@ inline F32 snap_to_sig_figs(F32 foo, S32 sig_figs) return new_foo; } +using std::lerp; // Even though there's now a std::lerp() function that appears to do the same -// as this function, for some reason MSVC likes this one better. Publishing -// std::lerp() into the global namespace instead of defining this function -// results in fatal argument conversion warnings. -inline F32 lerp(F32 a, F32 b, F32 u) +// as this function, in some cases MSVC likes this one better: some calls to +// std::lerp() produce fatal argument conversion warnings. +inline F32 flerp(F32 a, F32 b, F32 u) { return a + ((b - a) * u); } |