public abstract class LongMath
extends java.lang.Object
A subset of JavaScript's Math functions applicable to type long
.
Constructor and Description |
---|
LongMath() |
Modifier and Type | Method and Description |
---|---|
static long |
abs(long x)
Return Math.abs(x).
|
static long |
max(long x,
long y)
Return Math.max(x, y).
|
static long |
min(long x,
long y)
Return Math.min(x, y).
|
static int |
sign(long x)
Return Math.sign(x).
|
public static long abs(long x)
Return Math.abs(x).
OverflowException
if x == long.MIN_VALUE
.
x
- Argument value.public static long max(long x, long y)
Return Math.max(x, y).
x
- First argument.y
- Second argument.public static long min(long x, long y)
Return Math.min(x, y).
x
- First argument.y
- Second argument.