Here you can find the source of between(float a, float b, float x)
public final static boolean between(float a, float b, float x)
//package com.java2s; //License from project: LGPL public class Main { /** @return true if x is between a and b. */ public final static boolean between(float a, float b, float x) { return x < Math.max(a, b) && x > Math.min(a, b); }/*from w ww .jav a 2 s . co m*/ }