src/main/java/org/a05annex/util/Utl.java
public static double clip(double value, double min, double max) {
        if (min >= max) {
            throw new IllegalArgumentException("min must be less than max.");
        }
        return Math.min(Math.max(value, min), max);
    }
/**
     * clip a value to be within the specified min-max range. Specifically, if {@code value} is
     * less than {@code min}, then set it to {@code min}; if {@code value} is greater than {@code max},
     * then set it to max.
     * @param value The value to be clipped.
     * @param min The minimum of the valid range. If {@code value} is less than {@code min},
     *            then {@code min} will be returned. Set to {@link Double#NEGATIVE_INFINITY} if
     *            there is no lower bound.
     * @param max The maximum of the valid range. If {@code value} is greater than {@code max},
     *            then {@code max} will be returned. Set to {@link Double#POSITIVE_INFINITY} if
     *            there is no upper bound.
     * @return Returns {@code value} clipped to the specified {@code min} {@code max} range.
     * @throws IllegalArgumentException Thrown if {@code (min >= max)}.
     */
clip a value to be within the specified min-max range. Specifically, if  value is
less than  min, then set it to  min; if  value is greater than  max,
then set it to max.
@param value The value to be clipped.
@param min The minimum of the valid range. If  value is less than  min,
then  min will be returned. Set to  Double#NEGATIVE_INFINITY if
there is no lower bound.
@param max The maximum of the valid range. If  value is greater than  max,
then  max will be returned. Set to  Double#POSITIVE_INFINITY if
there is no upper bound.
@return Returns  value clipped to the specified  min  max range.
@throws IllegalArgumentException Thrown if  (min >= max).
clip a value to be within the specified min - max range . Specifically if value is less than min then set it to min ; if value is greater than max then set it to max . @param value The value to be clipped . @param min The minimum of the valid range . If value is less than min then min will be returned . Set to Double#NEGATIVE_INFINITY if there is no lower bound . @param max The maximum of the valid range . If value is greater than max then max will be returned . Set to Double#POSITIVE_INFINITY if there is no upper bound . @return Returns value clipped to the specified min max range . @throws IllegalArgumentException Thrown if ( min > = max ) .
public static double clip(double value, double min, double max) {
        if (min >= max) {
            throw new IllegalArgumentException("min must be less than max.");
        }
        return Math.min(Math.max(value, min), max);
    }
public static double clip ( double value , double min , double max ) { if ( min >= max ) { throw new IllegalArgumentException ( "min must be less than max." ) ; } return Math . min ( Math . max ( value , min ) , max ) ; }
clip a value to be within the specified min-max range.
clip a value to be within the specified min - max range .