1
0
mirror of https://github.com/MikeMcl/decimal.js.git synced 2026-09-23 04:14:32 +00:00

#88 Update doc and .mjs after toNearest change

This commit is contained in:
Michael Mclaughlin
2018-03-10 19:43:59 +00:00
parent c99bdef459
commit 6016146ef7
3 changed files with 39 additions and 58 deletions

View File

@@ -2114,14 +2114,8 @@
/*
* Returns a new Decimal whose value is the nearest multiple of the magnitude of `y` to the value
* of this Decimal.
*
* If the value of this Decimal is equidistant from two multiples of `y`, the rounding mode `rm`,
* or `Decimal.rounding` if `rm` is omitted, determines the direction of the nearest multiple.
*
* In the context of this method, rounding mode 4 (ROUND_HALF_UP) is the same as rounding mode 0
* (ROUND_UP), and so on.
* Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding
* mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal.
*
* The return value will always have the same sign as this Decimal, unless either this Decimal
* or `y` is NaN, in which case the return value will be also be NaN.