@@ -65,12 +65,12 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive).
6565
6666``` res example
6767/* prints "7.71234e+1" */
68- 77.1234-> Js.Float.toExponential->Js.log
68+ Js.Float.toExponential(77.1234) ->Js.log
6969```
7070
7171``` res example
7272/* prints "7.7e+1" */
73- 77.-> Js.Float.toExponential->Js.log
73+ Js.Float.toExponential(77.) ->Js.log
7474```
7575
7676## toExponentialWithPrecision
@@ -89,7 +89,7 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive).
8989
9090``` res example
9191/* prints "7.71e+1" */
92- 77.1234-> Js.Float.toExponentialWithPrecision(~digits=2)->Js.log
92+ Js.Float.toExponentialWithPrecision(77.1234, ~digits=2)->Js.log
9393```
9494
9595## toFixed
@@ -104,12 +104,12 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive).
104104
105105``` res example
106106/* prints "12346" (note the rounding) */
107- 12345.6789-> Js.Float.toFixed->Js.log
107+ Js.Float.toFixed(12345.6789) ->Js.log
108108```
109109
110110``` res example
111111/* print "1.2e+21" */
112- 1.2e21-> Js.Float.toFixed->Js.log
112+ Js.Float.toFixed(1.2e21) ->Js.log
113113```
114114
115115## toFixedWithPrecision
@@ -128,12 +128,12 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive).
128128
129129``` res example
130130/* prints "12345.7" (note the rounding) */
131- 12345.6789-> Js.Float.toFixedWithPrecision(~digits=1)->Js.log
131+ Js.Float.toFixedWithPrecision(12345.6789, ~digits=1)->Js.log
132132```
133133
134134``` res example
135135/* prints "0.00" (note the added zeroes) */
136- 0.-> Js.Float.toFixedWithPrecision(~digits=2)->Js.log
136+ Js.Float.toFixedWithPrecision(0., ~digits=2)->Js.log
137137```
138138
139139## toPrecision
@@ -150,12 +150,12 @@ Raises `RangeError` if `digits` is not in the range accepted by this function.
150150
151151``` res example
152152/* prints "12345.6789" */
153- 12345.6789-> Js.Float.toPrecision->Js.log
153+ Js.Float.toPrecision(12345.6789) ->Js.log
154154```
155155
156156``` res example
157157/* print "1.2e+21" */
158- 1.2e21-> Js.Float.toPrecision->Js.log
158+ Js.Float.toPrecision(1.2e21) ->Js.log
159159```
160160
161161## toPrecisionWithPrecision
@@ -177,12 +177,12 @@ Raises `RangeError` if `digits` is not in the range accepted by this function.
177177
178178``` res example
179179/* prints "1e+4" */
180- 12345.6789-> Js.Float.toPrecisionWithPrecision(~digits=1)->Js.log
180+ Js.Float.toPrecisionWithPrecision(12345.6789, ~digits=1)->Js.log
181181```
182182
183183``` res example
184184/* prints "0.0" */
185- 0.-> Js.Float.toPrecisionWithPrecision(~digits=2)->Js.log
185+ Js.Float.toPrecisionWithPrecision(0., ~digits=2)->Js.log
186186```
187187
188188## toString
@@ -196,7 +196,7 @@ Returns a `string` representing the given value in fixed-point (usually).
196196
197197``` res example
198198/* prints "12345.6789" */
199- 12345.6789-> Js.Float.toString->Js.log
199+ Js.Float.toString(12345.6789) ->Js.log
200200```
201201
202202## toStringWithRadix
@@ -213,23 +213,23 @@ Raises `RangeError` if `radix` is not in the range \[2, 36\] (inclusive).
213213
214214``` res example
215215/* prints "110" */
216- 6.-> Js.Float.toStringWithRadix(~radix=2)->Js.log
216+ Js.Float.toStringWithRadix(6., ~radix=2)->Js.log
217217```
218218
219219``` res example
220220/* prints "11.001000111101011100001010001111010111000010100011111" */
221- 3.14-> Js.Float.toStringWithRadix(~radix=2)->Js.log
221+ Js.Float.toStringWithRadix(3.14, ~radix=2)->Js.log
222222```
223223
224224``` res example
225225/* prints "deadbeef" */
226- 3735928559.-> Js.Float.toStringWithRadix(~radix=16)->Js.log
226+ Js.Float.toStringWithRadix(3735928559., ~radix=16)->Js.log
227227
228228```
229229
230230``` res example
231231/* prints "3f.gez4w97ry0a18ymf6qadcxr" */
232- 123.456-> Js.Float.toStringWithRadix(~radix=36)->Js.log
232+ Js.Float.toStringWithRadix(123.456, ~radix=36)->Js.log
233233```
234234
235235## fromString
0 commit comments