Nez.Portable/Math/Mathf.cs
/// <summary>
/// Calculates the shortest difference between two given angles given in radians
/// </summary>
/// <returns>The angle.</returns>
/// <param name="current">Current.</param>
/// <param name="target">Target.</param>
Calculates the shortest difference between two given angles given in radians
Calculates the shortest difference between two given angles given in radians
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static float deltaAngleRadians(float current, float target)
        {
            var num = repeat(target - current, 2 * MathHelper.Pi);
            if (num > MathHelper.Pi)
                num -= 2 * MathHelper.Pi;
            return num;
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static float deltaAngleRadians ( float current , float target ) { var num = repeat ( target - current , 2 * MathHelper . Pi ) ; if ( num > MathHelper . Pi ) num -= 2 * MathHelper . Pi ; return num ; }
Calculates the shortest difference between two given angles given in radians
Calculates the shortest difference between two given angles given in radians
None
current
float
None
target
float
None