diff options
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.hh')
-rw-r--r-- | source/blender/blenlib/BLI_math_base.hh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_math_base.hh b/source/blender/blenlib/BLI_math_base.hh index 83f414f853a..81f5343056e 100644 --- a/source/blender/blenlib/BLI_math_base.hh +++ b/source/blender/blenlib/BLI_math_base.hh @@ -102,7 +102,10 @@ template<typename T, BLI_ENABLE_IF((is_math_float_type<T>))> inline T fract(cons return a - std::floor(a); } -template<typename T, typename FactorT, BLI_ENABLE_IF((is_math_float_type<FactorT>))> +template<typename T, + typename FactorT, + BLI_ENABLE_IF((std::is_arithmetic_v<T>)), + BLI_ENABLE_IF((is_math_float_type<FactorT>))> inline T interpolate(const T &a, const T &b, const FactorT &t) { return a * (1 - t) + b * t; |