@@ -65,12 +65,12 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive).
65
65
66
66
``` res example
67
67
/* prints "7.71234e+1" */
68
- \"@@"( Js.log, Js. Float.toExponential(77.1234))
68
+ Js.Float.toExponential(77.1234)->Js.log
69
69
```
70
70
71
71
``` res example
72
72
/* prints "7.7e+1" */
73
- \"@@"( Js.log, Js. Float.toExponential(77.))
73
+ Js.Float.toExponential(77.)->Js.log
74
74
```
75
75
76
76
## toExponentialWithPrecision
@@ -89,7 +89,7 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive).
89
89
90
90
``` res example
91
91
/* prints "7.71e+1" */
92
- \"@@"( Js.log, Js. Float.toExponentialWithPrecision(77.1234, ~digits=2))
92
+ Js.Float.toExponentialWithPrecision(77.1234, ~digits=2)->Js.log
93
93
```
94
94
95
95
## toFixed
@@ -104,12 +104,12 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive).
104
104
105
105
``` res example
106
106
/* prints "12346" (note the rounding) */
107
- \"@@"( Js.log, Js. Float.toFixed(12345.6789))
107
+ Js.Float.toFixed(12345.6789)->Js.log
108
108
```
109
109
110
110
``` res example
111
111
/* print "1.2e+21" */
112
- \"@@"( Js.log, Js. Float.toFixed(1.2e21))
112
+ Js.Float.toFixed(1.2e21)->Js.log
113
113
```
114
114
115
115
## toFixedWithPrecision
@@ -128,12 +128,12 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive).
128
128
129
129
``` res example
130
130
/* prints "12345.7" (note the rounding) */
131
- \"@@"( Js.log, Js. Float.toFixedWithPrecision(12345.6789, ~digits=1))
131
+ Js.Float.toFixedWithPrecision(12345.6789, ~digits=1)->Js.log
132
132
```
133
133
134
134
``` res example
135
135
/* prints "0.00" (note the added zeroes) */
136
- \"@@"( Js.log, Js. Float.toFixedWithPrecision(0., ~digits=2))
136
+ Js.Float.toFixedWithPrecision(0., ~digits=2)->Js.log
137
137
```
138
138
139
139
## toPrecision
@@ -150,12 +150,12 @@ Raises `RangeError` if `digits` is not in the range accepted by this function.
150
150
151
151
``` res example
152
152
/* prints "12345.6789" */
153
- \"@@"( Js.log, Js. Float.toPrecision(12345.6789))
153
+ Js.Float.toPrecision(12345.6789)->Js.log
154
154
```
155
155
156
156
``` res example
157
157
/* print "1.2e+21" */
158
- \"@@"( Js.log, Js. Float.toPrecision(1.2e21))
158
+ Js.Float.toPrecision(1.2e21)->Js.log
159
159
```
160
160
161
161
## toPrecisionWithPrecision
@@ -177,12 +177,12 @@ Raises `RangeError` if `digits` is not in the range accepted by this function.
177
177
178
178
``` res example
179
179
/* prints "1e+4" */
180
- \"@@"( Js.log, Js. Float.toPrecisionWithPrecision(12345.6789, ~digits=1))
180
+ Js.Float.toPrecisionWithPrecision(12345.6789, ~digits=1)->Js.log
181
181
```
182
182
183
183
``` res example
184
184
/* prints "0.0" */
185
- \"@@"( Js.log, Js. Float.toPrecisionWithPrecision(0., ~digits=2))
185
+ Js.Float.toPrecisionWithPrecision(0., ~digits=2)->Js.log
186
186
```
187
187
188
188
## toString
@@ -196,7 +196,7 @@ Returns a `string` representing the given value in fixed-point (usually).
196
196
197
197
``` res example
198
198
/* prints "12345.6789" */
199
- \"@@"( Js.log, Js. Float.toString(12345.6789))
199
+ Js.Float.toString(12345.6789)->Js.log
200
200
```
201
201
202
202
## toStringWithRadix
@@ -213,22 +213,23 @@ Raises `RangeError` if `radix` is not in the range \[2, 36\] (inclusive).
213
213
214
214
``` res example
215
215
/* prints "110" */
216
- \"@@"( Js.log, Js. Float.toStringWithRadix(6., ~radix=2))
216
+ Js.Float.toStringWithRadix(6., ~radix=2)->Js.log
217
217
```
218
218
219
219
``` res example
220
220
/* prints "11.001000111101011100001010001111010111000010100011111" */
221
- \"@@"( Js.log, Js. Float.toStringWithRadix(3.14, ~radix=2))
221
+ Js.Float.toStringWithRadix(3.14, ~radix=2)->Js.log
222
222
```
223
223
224
224
``` res example
225
225
/* prints "deadbeef" */
226
- \"@@"(Js.log, Js.Float.toStringWithRadix(3735928559., ~radix=16))
226
+ Js.Float.toStringWithRadix(3735928559., ~radix=16)->Js.log
227
+
227
228
```
228
229
229
230
``` res example
230
231
/* prints "3f.gez4w97ry0a18ymf6qadcxr" */
231
- \"@@"( Js.log, Js. Float.toStringWithRadix(123.456, ~radix=36))
232
+ Js.Float.toStringWithRadix(123.456, ~radix=36)->Js.log
232
233
```
233
234
234
235
## fromString
0 commit comments