Any value to build a BigDecimal from. Types other than Number (as safe integer), BigInt and BigDecimal
will be internally converted to string and parsed.
Optional scale: numberScale to use, by default 0.
Optional mc: MathContextMathContext object which allows you to set precision and rounding mode.
RangeError on following situations:
[-Number.MAX_VALUE, Number.MAX_VALUE]undefined is same as omitting an argument.safe integer, a BigInt or a BigDecimal, it will be converted to string.
An error will be thrown if the string format is invalid.BigInt or number, and scale is given.Generated using TypeDoc
Constructor function for BigDecimal. Can be invoked with new or without new.
The values passed must match one of Java BigDecimal's constructors, so the valid usages of this function is listed below:
Sample Usage: