Here you can find the source of inRange(float n, float min, float max)
Parameter | Description |
---|---|
n | The number. |
min | The minimum value in the range (inclusive). |
max | The maximum value in the range (exclusive). |
public static boolean inRange(float n, float min, float max)
//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)); } }