| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static long | Returns: the sum of the values, capped toLong#MAX_VALUEthe first value a, long the second value b)Returns the sum of its arguments, capping to |
| public static int | Returns: the sum of the values, capped tomaxValuethe first value a, int the second value b, int maxValue)Returns the sum of its arguments, capping to |
| public static boolean | Returns: whether the sum of the arguments overflows anintthe first value a, int the second value b)Returns whether the sum of the arguments overflows an |
| MathUtils | back to summary |
|---|---|
| private MathUtils() | |
| cappedAdd | back to summary |
|---|---|
| public static long cappedAdd(long a, long b) Returns the sum of its arguments, capping to
| |
| cappedAdd | back to summary |
|---|---|
| public static int cappedAdd(int a, int b, int maxValue) Returns the sum of its arguments, capping to
| |
| sumOverflows | back to summary |
|---|---|
| public static boolean sumOverflows(int a, int b) Returns whether the sum of the arguments overflows an
| |