mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2024-10-27 20:34:12 +00:00
Merge pull request #135 from eliottvincent/master
#134 Correct documentation examples
This commit is contained in:
commit
5a6e1384d8
@ -2388,8 +2388,8 @@ x.toPrecision() // '45.6'
|
|||||||
y.toPrecision() // '45.6'
|
y.toPrecision() // '45.6'
|
||||||
x.toPrecision(1) // '5e+1'
|
x.toPrecision(1) // '5e+1'
|
||||||
y.toPrecision(1) // '5e+1'
|
y.toPrecision(1) // '5e+1'
|
||||||
y.toPrecision(2, Decimal.ROUND_UP) // '4.6e+1'
|
y.toPrecision(2, Decimal.ROUND_UP) // '46'
|
||||||
y.toPrecision(2, Decimal.DOWN) // '4.5e+1'
|
y.toPrecision(2, Decimal.ROUND_DOWN) // '45'
|
||||||
x.toPrecision(5) // '45.600'
|
x.toPrecision(5) // '45.600'
|
||||||
y.toPrecision(5) // '45.600'</pre>
|
y.toPrecision(5) // '45.600'</pre>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user