Java Double Number Between betweenOrEqual(double max, double min, double val)

Here you can find the source of betweenOrEqual(double max, double min, double val)

Description

between Or Equal

License

Open Source License

Declaration

public static final boolean betweenOrEqual(double max, double min, double val) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static final boolean betweenOrEqual(double max, double min, double val) {
        if (val > max || val < min)
            return false;
        else/*from w  w w.  ja v a  2 s . co m*/
            return true;
    }

    public static final boolean betweenOrEqual(float max, float min, float val) {
        if (val > max || val < min)
            return false;
        else
            return true;
    }

    public static final boolean betweenOrEqual(int max, int min, int val) {
        if (val > max || val < min)
            return false;
        else
            return true;
    }

    public static final boolean betweenOrEqual(long max, long min, long val) {
        if (val > max || val < min)
            return false;
        else
            return true;
    }
}

Related

  1. between(double value, double min, double max)
  2. between(double value, double value1, double value2)
  3. between(double value1, double value2, double valueObj)
  4. between(double valueToCompare, double leftBoundary, double rightBoundary, double epsilon)
  5. between(final double zScore, final int firstIndex, final int secondIndex)