Afterglow.Math.MathExtensions.ClampMax C# (CSharp) Method

ClampMax() public static method

Clamps the value to the given maximum.
public static ClampMax ( this value, float max ) : float
value this The value.
max float The maximum.
return float
        public static float ClampMax(this float value, float max)
        {
            if (value > max)
            {
                return max;
            }

            return value;
        }