Nez.Portable/Math/Mathf.cs
/// <summary>
/// clamps value between 0 and 1
/// </summary>
/// <param name="value">Value.</param>
clamps value between 0 and 1
clamps value between 0 and 1
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static float clamp01(float value)
        {
            if (value < 0f)
                return 0f;
            if (value > 1f)
                return 1f;
            return value;
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static float clamp01 ( float value ) { if ( value < 0f ) return 0f ; if ( value > 1f ) return 1f ; return value ; }
clamps value between 0 and 1
clamps value between 0 and 1
value
float
None