Click or drag to resize

GLMathfWlerp01 Method

Linearly interpolates between two values between 0 and 1 if values wrap around from 1 back to 0.

Namespace:  Gamelogic.Extensions
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
Remarks
This is useful, for example, in lerping between angles.
Examples
float angleInRad1 = 1;
            float angleInRad2 = 5;
            float revolution = Mathf.PI * 2;
            float interpolation = WLerp(angleInRad1 / revolution, angleInRad2 / revolution, 0.5f);

            //interpolation == (5 + 1 + Mathf.PI * 2)/2 = 3 + Mathf.PI
See Also