Here you can find the source of between(double value1, double value2, double valueObj)
static boolean between(double value1, double value2, double valueObj)
//package com.java2s; //License from project: Open Source License public class Main { static boolean between(double value1, double value2, double valueObj) { return ((valueObj >= value1 && valueObj <= value2) || (valueObj <= value1 && valueObj >= value2)); }/*from w ww .j av a2 s.c o m*/ }