[UE4][Linear Algebra]Lerp calculation formula and usage example

1 · 王爱国 · Nov. 26, 2016, 10:17 a.m.
UnrealMathUnlity.h: /** Performs a linear interpolation between two values, Alpha ranges from 0-1 */ template< class T, class U > static FORCEINLINE_DEBUGGABLE T Lerp( const T& A, const T& B, const U& Alpha ) { return (T)(A + Alpha * (B-A)); } /** Performs a linear interpolation between two values, Alpha ranges from 0-1. Handles full numeric range of T */ template< class T > static FORCEINLINE_DEBUGGABLE T LerpStable( const T& A, const T& B, double Alpha ) { return (T)((A * (1....