Package tech.units.indriya.function
Class Calculus
java.lang.Object
tech.units.indriya.function.Calculus
Mathematical helper class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MathContextThe default MathContext used for BigDecimal calculus.private static final Loggerstatic MathContextExposes (non-final) the MathContext used for BigDecimal calculus.private static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NumberReturns the absolute value ofnumberstatic booleanisLessThanOne(Number number) static NumberReturns the negated value ofnumberstatic BigDecimaltoBigDecimal(Number number) Converts a number toBigDecimalstatic BigIntegertoBigInteger(Number number) Converts a number toBigInteger
-
Field Details
-
MSG_NUMBER_NON_NULL
- See Also:
-
logger
-
DEFAULT_MATH_CONTEXT
The default MathContext used for BigDecimal calculus. -
MATH_CONTEXT
Exposes (non-final) the MathContext used for BigDecimal calculus.
-
-
Constructor Details
-
Calculus
public Calculus()
-
-
Method Details
-
toBigDecimal
Converts a number toBigDecimal- Parameters:
number- the number to be converted- Returns:
- the number converted
-
toBigInteger
Converts a number toBigInteger- Parameters:
number- the number to be converted- Returns:
- the number converted
-
abs
Returns the absolute value ofnumber- Parameters:
number-- Returns:
-
negate
Returns the negated value ofnumber- Parameters:
number-- Returns:
- -number
-
isLessThanOne
- Parameters:
number-- Returns:
-