public class MathUtils
extends java.lang.Object
| Constructor and Description |
|---|
MathUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double |
getMax(double... numbers)
Finds the largest number in a set of numbers
|
static double |
getMin(double... numbers)
Finds the smallest number in a set of numbers
|
static boolean |
isBetween(double min,
double max,
double value,
boolean inclusive)
Checks if the specified value is between the provided range
|
static boolean |
isEvenNumber(int number)
Checks if the given number is even
|
static boolean |
isStringNumber(java.lang.String string)
Checks if the given string represents a number
|
static boolean |
isWholeNumber(java.lang.Number number)
Checks if the specified number is a whole number
|
public static boolean isWholeNumber(java.lang.Number number)
number - Number to checkpublic static double getMin(double... numbers)
numbers - The numbers to search throughpublic static double getMax(double... numbers)
numbers - The numbers to search throughpublic static boolean isBetween(double min,
double max,
double value,
boolean inclusive)
min - The minimum of the rangemax - The maximum of the rangevalue - The value to testinclusive - Whether to include the min and max in calculationspublic static boolean isStringNumber(java.lang.String string)
string - The stringpublic static boolean isEvenNumber(int number)
number - The number