public class MathUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static long |
cappedAdd(long a,
long b)
Returns the sum of its arguments, capping to
Long.MAX_VALUE if they overflow. |
static boolean |
sumOverflows(int a,
int b)
Returns whether the sum of the arguments overflows an
int. |
public static boolean sumOverflows(int a,
int b)
int.a - the first valueb - the second valueintpublic static long cappedAdd(long a,
long b)
Long.MAX_VALUE if they overflow.a - the first valueb - the second valueLong.MAX_VALUECopyright © 2010 - 2020 Adobe. All Rights Reserved