is double value Between - Java java.lang

Java examples for java.lang:double

Description

is double value Between

Demo Code


//package com.java2s;

public class Main {
    public static boolean isBetween(double target, double leftLimit,
            double rightLimit) {
        return Double.compare(target, leftLimit) > 0
                && Double.compare(target, rightLimit) < 0;
    }/* w w  w.j av a  2s . c o m*/
}

Related Tutorials