Java Float Number Between between(float a, float b, float x)

Here you can find the source of between(float a, float b, float x)

Description

between

License

LGPL

Return

true if x is between a and b.

Declaration

public final static boolean between(float a, float b, float x) 

Method Source Code

//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*/
}

Related

  1. between(float number, float boundary1, float boundary2)
  2. between(float value, float min, float max)