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