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
roundign 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 valuepublic 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 value