| Modifier and Type | Method and Description |
|---|---|
static long |
avg(DecimalArithmetic arith,
DecimalRounding rounding,
long a,
long b)
Calculates and returns the average of the two values applying the given
rounding if necessary.
|
static long |
avg(long a,
long b)
Calculates and returns the average of the two values rounded DOWN.
|
public static final long avg(long a, long b)
a - the first valueb - the second valueroundDOWN((a + b) / 2)public static final long avg(DecimalArithmetic arith, DecimalRounding rounding, long a, long b)
arith - the arithmetic associated with the two valuesrounding - the rounding to apply if necessarya - the first valueb - the second valueround((a + b) / 2)