public interface IMath<T>
Modifier and Type | Method and Description |
---|---|
T |
add(T lhs,
T rhs)
Adds lhs + rhs
|
int |
compare(T lhs,
T rhs)
Compares lhs and rhs values
|
T |
dec(T value)
Decrements value by 1
|
T |
fromDouble(double value)
Converts specified value from double equivalent
|
T |
getMaxValue()
Gets the max value for T
|
T |
getMinValue()
Gets the min value for T
|
T |
getZeroValue()
Gets zero value for T
|
T |
inc(T value)
Increments value by 1
|
boolean |
isNan(T value)
Checks whether specified value is NaN value
|
T |
max(T a,
T b)
Gets maximum value of a and b
|
T |
min(T a,
T b)
Gets minimum value of a and b
|
T |
mult(T lhs,
double rhs)
Multiplies lhs * rhs
|
T |
mult(T lhs,
int rhs)
Multiplies lhs * rhs
|
T |
substract(T lhs,
T rhs)
Subtracts lhs - rhs
|
double |
toDouble(T value)
Converts specified value to its double equivalent
|
T getMinValue()
T getMaxValue()
T getZeroValue()
T max(@NonNull T a, @NonNull T b)
a
- The first value to compareb
- The second value to compareT min(@NonNull T a, @NonNull T b)
a
- The first value to compareb
- The second value to compareboolean isNan(@NonNull T value)
value
- The value to checkdouble toDouble(@NonNull T value)
value
- The value to convertT fromDouble(double value)
value
- The double equivalentT mult(@NonNull T lhs, double rhs)
lhs
- The first argumentrhs
- The second argumentT mult(@NonNull T lhs, int rhs)
lhs
- The first argumentrhs
- The second argumentT add(@NonNull T lhs, @NonNull T rhs)
lhs
- The first argumentrhs
- The second argumentT substract(@NonNull T lhs, @NonNull T rhs)
lhs
- The first argumentrhs
- The second argumentT inc(@NonNull T value)
value
- The value to incrementT dec(@NonNull T value)
value
- The value to decrement