public class Maths extends Object
Constructor and Description |
---|
Maths() |
Modifier and Type | Method and Description |
---|---|
static int |
floor(double num) |
static double |
getGcd(double a,
double b) |
static double |
getGcd(double a,
double b,
int internalAmount) |
static boolean |
isOnGround(double y) |
static boolean |
isOutOfBounds(int index,
int length,
int capacity)
Determine if the requested
index and length will fit within capacity . |
static int |
round(double num) |
static int |
roundLoc(double num) |
static double |
square(double num) |
public static boolean isOnGround(double y)
public static int floor(double num)
public static int round(double num)
public static int roundLoc(double num)
public static double square(double num)
public static double getGcd(double a, double b)
public static double getGcd(double a, double b, int internalAmount)
public static boolean isOutOfBounds(int index, int length, int capacity)
index
and length
will fit within capacity
.index
- The starting index.length
- The length which will be utilized (starting from index
).capacity
- The capacity that index + length
is allowed to be within.false
if the requested index
and length
will fit within capacity
.
true
if this would result in an index out of bounds exception.