mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2024-10-27 20:34:12 +00:00
commit
fe487dc39e
@ -2050,7 +2050,7 @@ x.toBinary(1) // '0b1p+8'</pre>
|
|||||||
<pre>
|
<pre>
|
||||||
x = new Decimal(12.34567)
|
x = new Decimal(12.34567)
|
||||||
x.toDecimalPlaces(0) // '12'
|
x.toDecimalPlaces(0) // '12'
|
||||||
x.toDecimalPlaces(1, Decimal.ROUND_UP) // '12.3'
|
x.toDecimalPlaces(1, Decimal.ROUND_UP) // '12.4'
|
||||||
|
|
||||||
y = new Decimal(9876.54321)
|
y = new Decimal(9876.54321)
|
||||||
y.toDP(3) // '9876.543'
|
y.toDP(3) // '9876.543'
|
||||||
|
Loading…
Reference in New Issue
Block a user