Java Double Number Clamp clamp(double var1, double var2, double var3)

Here you can find the source of clamp(double var1, double var2, double var3)

Description

clamp

License

Apache License

Declaration

public static double clamp(double var1, double var2, double var3) 

Method Source Code

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

public class Main {
    public static double clamp(double var1, double var2, double var3) {
        if (var1 > var3) {
            var1 = var3;
        }//from   ww w  . j  a va2  s.  c  o m

        if (var1 < var2) {
            var1 = var2;
        }

        return var1;
    }
}

Related

  1. clamp(double value, double min, double max)
  2. clamp(double value, double min, double max)
  3. clamp(double value, double min, double max)
  4. clamp(double value, double min, double max)
  5. clamp(double value, final double min, final double max)
  6. clamp(double weight, double lowerBound, double upperBound)
  7. clamp(double x, double low, double high)
  8. clamp(double x, double min, double max)
  9. clamp(double x, double min, double max)