- Adding a default value allows Decimal to be constructed without arguments and not throw an error. Javascript primitives like String and Number can be constructed without an argument and this property is useful when using the type with a library like class-transformer.
- Assign a default value of zero as the decimal with no constructor argument.
This will test numbers that are less than half the first argument (y) of the toNearest function.
If the y value is ten, the decimal value on which toNearest is tested will be a multiplication of ten plus less than 5.
Avoid potential confusion over the round method: ceil, floor, round and
trunc no longer accept arguments and so they match their JS Math object
equivalents. Removed toInteger as round now handles rounding to integer. Added
toSignificantDigits as round no longer rounds to precision. Updated tests
accordingly. Calling config without argument no longer throws.