Nez.Portable/Math/Mathf.cs
/// <summary>
/// floors the float to the nearest int value below x. note that this only works for values in the range of short
/// </summary>
/// <returns>The floor to int.</returns>
/// <param name="x">The x coordinate.</param>
floors the float to the nearest int value below x. note that this only works for values in the range of short
floors the float to the nearest int value below x . note that this only works for values in the range of short
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static int fastFloorToInt(float x)
        {
            return (int)(x + 32768f) - 32768;
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static int fastFloorToInt ( float x ) { return ( int ) ( x + 32768f ) - 32768 ; }
floors the float to the nearest int value below x. note that this only works for values in the range of short
floors the float to the nearest int value below x . note that this only works for values in the range of short
// we shift to guaranteed positive before casting then shift back after
The floor to int.
The floor to int .
x
float
The x coordinate.
The x coordinate .