List of utility methods to do Number Range Check
boolean | inRange(double lat, double lon) in Range if (Double.compare(lat, 90) <= 0 && Double.compare(lat, -90) >= 0 && Double.compare(lon, 180) <= 0 && Double.compare(lon, -180) >= 0) { return true; return false; |
boolean | inRange(double query, double min, double max) in Range return query >= min && query <= max;
|
boolean | inRange(double value, double lower, double upper) Check if a value is within a given range return value >= lower && value < upper;
|
boolean | inRange(double value, double min, double max) in Range return (value >= min && value <= max);
|
boolean | inRange(double value, double min, double max) in Range return toRange(value, min, max) == value;
|
Boolean | inRange(double value, double target, double range) in Range if (value <= target + range) { if (value >= target - range) { return true; return false; |
boolean | inRange(double x, double y, double z, double sx, double sy, double sz, double r) in Range return (((x - sx) * (x - sx)) + ((y - sy) * (y - sy)) + ((z - sz) * (z - sz))) <= (r * r);
|
boolean | inRange(E element, E min, E max) in Range int toMin = element.compareTo(min); int toMax = element.compareTo(max); return toMin == 0 ? true : toMin < 0 ? false : toMax == 0 ? true : toMax > 0 ? false : true; |
boolean | inRange(final float testNum, final float min, final float max) Is testNum in range?
boolean in = false; if (!Float.isNaN(testNum)) { in = testNum >= min && testNum <= max; return in; |
boolean | inRange(final int id, final int min, final int max) in Range if (min > 10000) return (id > min && id < max); return (id < max && id > min); |