Java Double Number Between between(double a, double b, double candidate)

Here you can find the source of between(double a, double b, double candidate)

Description

between

License

Open Source License

Declaration

private static boolean between(double a, double b, double candidate) 

Method Source Code

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

public class Main {
    private static boolean between(double a, double b, double candidate) {
        double min = Math.min(a, b);
        double max = Math.max(a, b);

        return candidate >= min && candidate <= max;
    }/*from   ww w  .  jav  a2s  .  c  o m*/
}

Related

  1. between(double a, double b, double alpha)
  2. between(double a, double x, double b)
  3. between(double value, double end1, double end2)
  4. between(double value, double min, double max)
  5. between(double value, double min, double max)