Skip to content

Commit f519649

Browse files
authored
Merge pull request #187 from bdunn313/remove-confusing-infix-syntax-from-js-api-docs
Remove @@ infix examples from Js.Float docs
2 parents d159dc9 + 3a998cb commit f519649

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

pages/docs/manual/latest/api/js/float.mdx

+17-16
Original file line numberDiff line numberDiff line change
@@ -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-
\"@@"(Js.log, Js.Float.toExponential(77.1234))
68+
Js.Float.toExponential(77.1234)->Js.log
6969
```
7070

7171
```res example
7272
/* prints "7.7e+1" */
73-
\"@@"(Js.log, Js.Float.toExponential(77.))
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-
\"@@"(Js.log, Js.Float.toExponentialWithPrecision(77.1234, ~digits=2))
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-
\"@@"(Js.log, Js.Float.toFixed(12345.6789))
107+
Js.Float.toFixed(12345.6789)->Js.log
108108
```
109109

110110
```res example
111111
/* print "1.2e+21" */
112-
\"@@"(Js.log, Js.Float.toFixed(1.2e21))
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-
\"@@"(Js.log, Js.Float.toFixedWithPrecision(12345.6789, ~digits=1))
131+
Js.Float.toFixedWithPrecision(12345.6789, ~digits=1)->Js.log
132132
```
133133

134134
```res example
135135
/* 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
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-
\"@@"(Js.log, Js.Float.toPrecision(12345.6789))
153+
Js.Float.toPrecision(12345.6789)->Js.log
154154
```
155155

156156
```res example
157157
/* print "1.2e+21" */
158-
\"@@"(Js.log, Js.Float.toPrecision(1.2e21))
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-
\"@@"(Js.log, Js.Float.toPrecisionWithPrecision(12345.6789, ~digits=1))
180+
Js.Float.toPrecisionWithPrecision(12345.6789, ~digits=1)->Js.log
181181
```
182182

183183
```res example
184184
/* prints "0.0" */
185-
\"@@"(Js.log, Js.Float.toPrecisionWithPrecision(0., ~digits=2))
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-
\"@@"(Js.log, Js.Float.toString(12345.6789))
199+
Js.Float.toString(12345.6789)->Js.log
200200
```
201201

202202
## toStringWithRadix
@@ -213,22 +213,23 @@ Raises `RangeError` if `radix` is not in the range \[2, 36\] (inclusive).
213213

214214
```res example
215215
/* prints "110" */
216-
\"@@"(Js.log, Js.Float.toStringWithRadix(6., ~radix=2))
216+
Js.Float.toStringWithRadix(6., ~radix=2)->Js.log
217217
```
218218

219219
```res example
220220
/* prints "11.001000111101011100001010001111010111000010100011111" */
221-
\"@@"(Js.log, Js.Float.toStringWithRadix(3.14, ~radix=2))
221+
Js.Float.toStringWithRadix(3.14, ~radix=2)->Js.log
222222
```
223223

224224
```res example
225225
/* prints "deadbeef" */
226-
\"@@"(Js.log, Js.Float.toStringWithRadix(3735928559., ~radix=16))
226+
Js.Float.toStringWithRadix(3735928559., ~radix=16)->Js.log
227+
227228
```
228229

229230
```res example
230231
/* prints "3f.gez4w97ry0a18ymf6qadcxr" */
231-
\"@@"(Js.log, Js.Float.toStringWithRadix(123.456, ~radix=36))
232+
Js.Float.toStringWithRadix(123.456, ~radix=36)->Js.log
232233
```
233234

234235
## fromString

0 commit comments

Comments
 (0)