BigDecimal45
Constructors
fromBigIntconstCreates a BigDecimal from a bigint value.fromNumberconstCreates a BigDecimal safely from a finite number.fromNumberUnsafeconstCreates a BigDecimal from a finite number.fromStringconstParses a decimal string into a BigDecimal safely.fromStringUnsafeconstParses a decimal string into a BigDecimal, throwing if the string is invalid.makeconstCreates a BigDecimal from a bigint value and a scale.Models
Guards
Converting
Instances
Math
absconstDetermines the absolute value of a given BigDecimal.ceilconstComputes the ceiling of a BigDecimal at the given scale.clampconstRestricts the given BigDecimal to be within the range specified by the minimum and maximum values.divideconstDivides BigDecimals safely.divideUnsafeconstProvides an unsafe division operation on BigDecimals.floorconstComputes the floor of a BigDecimal at the given scale.maxconstReturns the maximum between two BigDecimals.minconstReturns the minimum between two BigDecimals.multiplyconstProvides a multiplication operation on BigDecimals.multiplyAllconstTakes an Iterable of BigDecimals and returns their multiplication as a single BigDecimal.negateconstProvides a negate operation on BigDecimals.remainderconstComputes the decimal remainder safely when one operand is divided by a second operand.remainderUnsafeconstReturns the decimal remainder left over when one operand is divided by a non-zero second operand.roundconstComputes a rounded BigDecimal at the given scale with the specified rounding mode.RoundingModetypeRounding modes for BigDecimal.signconstDetermines the sign of a given BigDecimal.subtractconstProvides a subtraction operation on BigDecimals.sumconstProvides an addition operation on BigDecimals.sumAllconstTakes an Iterable of BigDecimals and returns their sum as a single BigDecimal.truncateconstComputes a truncated BigDecimal at the given scale.Predicates
betweenconstChecks whether a BigDecimal is between a minimum and maximum value (inclusive).equalsconstChecks whether two BigDecimals are equal.isGreaterThanconstReturns true if the first argument is greater than the second, otherwise false.isGreaterThanOrEqualToconstChecks whether a given BigDecimal is greater than or equal to the provided one.isIntegerconstChecks whether a given BigDecimal is an integer.isLessThanconstReturns true if the first argument is less than the second, otherwise false.isLessThanOrEqualToconstChecks whether a given BigDecimal is less than or equal to the provided one.isNegativeconstChecks whether a given BigDecimal is negative.isPositiveconstChecks whether a given BigDecimal is positive.isZeroconstChecks whether a given BigDecimal is 0.