An extension of type-enforcer with Math related data types and enforcer functions
Rounds a number to a specified number of fraction digits and/or precision.
Param | Type | Default | Description |
---|---|---|---|
value | number |
The number to be rounded. | |
[fractionDigits] | number |
0 |
Must be a positive integer or null. |
[precision] | number |
0 |
Significant digits. |