src/Colourful/Utils/ClampHelper.cs
/// <summary>
/// If any value is less than the minimum, replace it with the minimum value.
/// If any value is greater than the maximum, replace it with the maximum value.
/// Otherwise, copy the value.
/// </summary>
If any value is less than the minimum, replace it with the minimum value.
If any value is greater than the maximum, replace it with the maximum value.
Otherwise, copy the value.
If any value is less than the minimum replace it with the minimum value . If any value is greater than the maximum replace it with the maximum value . Otherwise copy the value .
public static double[] Clamp(this double[] vector, double min, double max)
        {
            var croppedVector = vector.Select(x => x.Clamp(min, max)).ToArray();
            return croppedVector;
        }
public static double [ ] Clamp ( this double [ ] vector , double min , double max ) { var croppedVector = vector . Select ( x => x . Clamp ( min , max ) ) . ToArray ( ) ; return croppedVector ; }
If any value is less than the minimum, replace it with the minimum value.
If any value is less than the minimum replace it with the minimum value .
double[]
this
min
double
max
double