Package tech.units.indriya.function
Class Calculus
- java.lang.Object
-
- tech.units.indriya.function.Calculus
-
public final class Calculus extends java.lang.ObjectMathematical helper class
-
-
Field Summary
Fields Modifier and Type Field Description static java.math.MathContextDEFAULT_MATH_CONTEXTThe default MathContext used for BigDecimal calculus.private static java.util.logging.Loggerloggerstatic java.math.MathContextMATH_CONTEXTExposes (non-final) the MathContext used for BigDecimal calculus.private static java.lang.StringMSG_NUMBER_NON_NULL
-
Constructor Summary
Constructors Constructor Description Calculus()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Numberabs(java.lang.Number number)Returns the absolute value ofnumberstatic booleanisLessThanOne(java.lang.Number number)static java.lang.Numbernegate(java.lang.Number number)Returns the negated value ofnumberstatic java.math.BigDecimaltoBigDecimal(java.lang.Number number)Converts a number toBigDecimalstatic java.math.BigIntegertoBigInteger(java.lang.Number number)Converts a number toBigInteger
-
-
-
Field Detail
-
MSG_NUMBER_NON_NULL
private static final java.lang.String MSG_NUMBER_NON_NULL
- See Also:
- Constant Field Values
-
logger
private static final java.util.logging.Logger logger
-
DEFAULT_MATH_CONTEXT
public static final java.math.MathContext DEFAULT_MATH_CONTEXT
The default MathContext used for BigDecimal calculus.
-
MATH_CONTEXT
public static java.math.MathContext MATH_CONTEXT
Exposes (non-final) the MathContext used for BigDecimal calculus.
-
-
Method Detail
-
toBigDecimal
public static java.math.BigDecimal toBigDecimal(java.lang.Number number)
Converts a number toBigDecimal- Parameters:
number- the number to be converted- Returns:
- the number converted
-
toBigInteger
public static java.math.BigInteger toBigInteger(java.lang.Number number)
Converts a number toBigInteger- Parameters:
number- the number to be converted- Returns:
- the number converted
-
abs
public static java.lang.Number abs(java.lang.Number number)
Returns the absolute value ofnumber- Parameters:
number-- Returns:
-
negate
public static java.lang.Number negate(java.lang.Number number)
Returns the negated value ofnumber- Parameters:
number-- Returns:
- -number
-
isLessThanOne
public static boolean isLessThanOne(java.lang.Number number)
- Parameters:
number-- Returns:
-
-