- 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.