Java Double Number Clip clip(double value, double min, double max)

Here you can find the source of clip(double value, double min, double max)

Description

clip

License

LGPL

Declaration

public static double clip(double value, double min, double max) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static double clip(double value, double min, double max) {
        if (value > max)
            value = max;/*w  w w .j a v a2 s  . co  m*/
        else if (value < min)
            value = min;
        return value;
    }
}

Related

  1. clip(double v, double min, double max)
  2. clip(double value, double min, double max)
  3. clip(double[] values, double min, double max)
  4. clip(final double n, final double minValue, final double maxValue)
  5. clip(final double value, final double min, final double max)
  6. clip2(double n, double d, double[] t)