Class Calculus

java.lang.Object
tech.units.indriya.function.Calculus

public final class Calculus extends Object
Mathematical helper class
  • Field Details

    • MSG_NUMBER_NON_NULL

      private static final String MSG_NUMBER_NON_NULL
      See Also:
    • logger

      private static final Logger logger
    • DEFAULT_MATH_CONTEXT

      public static final MathContext DEFAULT_MATH_CONTEXT
      The default MathContext used for BigDecimal calculus.
    • MATH_CONTEXT

      public static MathContext MATH_CONTEXT
      Exposes (non-final) the MathContext used for BigDecimal calculus.
  • Constructor Details

    • Calculus

      public Calculus()
  • Method Details

    • toBigDecimal

      public static BigDecimal toBigDecimal(Number number)
      Converts a number to BigDecimal
      Parameters:
      number - the number to be converted
      Returns:
      the number converted
    • toBigInteger

      public static BigInteger toBigInteger(Number number)
      Converts a number to BigInteger
      Parameters:
      number - the number to be converted
      Returns:
      the number converted
    • abs

      public static Number abs(Number number)
      Returns the absolute value of number
      Parameters:
      number -
      Returns:
    • negate

      public static Number negate(Number number)
      Returns the negated value of number
      Parameters:
      number -
      Returns:
      -number
    • isLessThanOne

      public static boolean isLessThanOne(Number number)
      Parameters:
      number -
      Returns: