diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-02-27 13:56:04 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-02-27 13:56:04 +0800 |
commit | e566f9760246a54fda4dadade08d5ef15b5d8fc2 (patch) | |
tree | 95fb06fe7d816691d43e87424d2d48b1462ef0ee | |
parent | cb0a4f517b76357a6c4ae498398cd2bb8413a382 (diff) |
Avoid redefinition of lerp on GCC by using std's
to avoid conflict errors with GCC C++20 cmath's.
-rw-r--r-- | indra/llmath/llmath.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index fa315291a3..a72993a21a 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -358,10 +358,14 @@ inline F32 snap_to_sig_figs(F32 foo, S32 sig_figs) return new_foo; } +#ifdef __GNUC__ +using std::lerp; +#else inline F32 lerp(F32 a, F32 b, F32 u) { return a + ((b - a) * u); } +#endif inline F32 lerp2d(F32 x00, F32 x01, F32 x10, F32 x11, F32 u, F32 v) { |