public class MathUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
ceil(float value)
Returns the smallest integer greater than or equal to the specified float.
|
static int |
floor(float value)
Returns the largest integer less than or equal to the specified float.
|
static float |
limit(float number,
float between,
float and)
Limits the given number between the other values
|
static int |
limit(int number,
int between,
int and)
Limits the given number between the other values
|
static float |
max(float number,
float max) |
static int |
max(int number,
int max) |
static float |
min(float number,
float min) |
static int |
min(int number,
int min) |
public static int limit(int number,
int between,
int and)
number - The number to limit.between - The smallest value the number can take.and - The biggest value the number can take.public static float limit(float number,
float between,
float and)
number - The number to limit.between - The smallest value the number can take.and - The biggest value the number can take.public static float max(float number,
float max)
public static float min(float number,
float min)
public static int max(int number,
int max)
public static int min(int number,
int min)
public static int floor(float value)
public static int ceil(float value)