Java Number Range Check inRange(float n, float min, float max)

Here you can find the source of inRange(float n, float min, float max)

Description

Checks if x is inclusively within the specified range.

License

Open Source License

Parameter

Parameter Description
n The number.
min The minimum value in the range (inclusive).
max The maximum value in the range (exclusive).

Return

If xMin <= x < xMax .

Declaration

public static boolean inRange(float n, float min, float max) 

Method Source Code

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

public class Main {
    /**/*w  w  w  .j a v a  2  s. co  m*/
     * Checks if x is inclusively within the specified range.
     *
     * @param n
     *         The number.
     * @param min
     *         The minimum value in the range (inclusive).
     * @param max
     *         The maximum value in the range (exclusive).
     *
     * @return If {@code xMin <= x < xMax}.
     *
     * @since 14.03.30
     */
    public static boolean inRange(float n, float min, float max) {
        return ((n >= min) && (n < max));
    }
}

Related

  1. inRange(E element, E min, E max)
  2. inRange(final float testNum, final float min, final float max)
  3. inRange(final int id, final int min, final int max)
  4. inRange(final int value, final int min, final int max)
  5. inRange(final int value, final int min, final int max, final String fieldName)
  6. inrange(int actual, int leftRange, int rightRange)
  7. inRange(int check, int range)
  8. inRange(int checkValue, int min, int max)
  9. inRange(int firstIndex, int secondIndex)