Nez.Portable/Math/Mathf.cs
/// <summary>
/// Maps a value from some arbitrary range to the 0 to 1 range
/// </summary>
/// <param name="value">Value.</param>
/// <param name="min">Lminimum value.</param>
/// <param name="max">maximum value</param>
Maps a value from some arbitrary range to the 0 to 1 range
Maps a value from some arbitrary range to the 0 to 1 range
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static float map01(float value, float min, float max)
        {
            return (value - min) * 1f / (max - min);
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static float map01 ( float value , float min , float max ) { return ( value - min ) * 1f / ( max - min ) ; }
Maps a value from some arbitrary range to the 0 to 1 range
Maps a value from some arbitrary range to the 0 to 1 range
value
float
None
min
float
None
max
float
None