Package tech.units.indriya.function
Class Calculus
java.lang.Object
tech.units.indriya.function.Calculus
Mathematical helper class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MathContext
The default MathContext used for BigDecimal calculus.private static final Logger
static MathContext
Exposes (non-final) the MathContext used for BigDecimal calculus.private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Number
Returns the absolute value ofnumber
static boolean
isLessThanOne
(Number number) static Number
Returns the negated value ofnumber
static BigDecimal
toBigDecimal
(Number number) Converts a number toBigDecimal
static BigInteger
toBigInteger
(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:
-