diff --git a/pages/docs/manual/latest/api/js/float.mdx b/pages/docs/manual/latest/api/js/float.mdx index d45fe30c8..1da019985 100644 --- a/pages/docs/manual/latest/api/js/float.mdx +++ b/pages/docs/manual/latest/api/js/float.mdx @@ -65,12 +65,12 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive). ```res example /* prints "7.71234e+1" */ -\"@@"(Js.log, Js.Float.toExponential(77.1234)) +Js.Float.toExponential(77.1234)->Js.log ``` ```res example /* prints "7.7e+1" */ -\"@@"(Js.log, Js.Float.toExponential(77.)) +Js.Float.toExponential(77.)->Js.log ``` ## toExponentialWithPrecision @@ -89,7 +89,7 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive). ```res example /* prints "7.71e+1" */ -\"@@"(Js.log, Js.Float.toExponentialWithPrecision(77.1234, ~digits=2)) +Js.Float.toExponentialWithPrecision(77.1234, ~digits=2)->Js.log ``` ## toFixed @@ -104,12 +104,12 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive). ```res example /* prints "12346" (note the rounding) */ -\"@@"(Js.log, Js.Float.toFixed(12345.6789)) +Js.Float.toFixed(12345.6789)->Js.log ``` ```res example /* print "1.2e+21" */ -\"@@"(Js.log, Js.Float.toFixed(1.2e21)) +Js.Float.toFixed(1.2e21)->Js.log ``` ## toFixedWithPrecision @@ -128,12 +128,12 @@ Raises `RangeError` if `digits` is not in the range \[0, 20\] (inclusive). ```res example /* prints "12345.7" (note the rounding) */ -\"@@"(Js.log, Js.Float.toFixedWithPrecision(12345.6789, ~digits=1)) +Js.Float.toFixedWithPrecision(12345.6789, ~digits=1)->Js.log ``` ```res example /* prints "0.00" (note the added zeroes) */ -\"@@"(Js.log, Js.Float.toFixedWithPrecision(0., ~digits=2)) +Js.Float.toFixedWithPrecision(0., ~digits=2)->Js.log ``` ## toPrecision @@ -150,12 +150,12 @@ Raises `RangeError` if `digits` is not in the range accepted by this function. ```res example /* prints "12345.6789" */ -\"@@"(Js.log, Js.Float.toPrecision(12345.6789)) +Js.Float.toPrecision(12345.6789)->Js.log ``` ```res example /* print "1.2e+21" */ -\"@@"(Js.log, Js.Float.toPrecision(1.2e21)) +Js.Float.toPrecision(1.2e21)->Js.log ``` ## toPrecisionWithPrecision @@ -177,12 +177,12 @@ Raises `RangeError` if `digits` is not in the range accepted by this function. ```res example /* prints "1e+4" */ -\"@@"(Js.log, Js.Float.toPrecisionWithPrecision(12345.6789, ~digits=1)) +Js.Float.toPrecisionWithPrecision(12345.6789, ~digits=1)->Js.log ``` ```res example /* prints "0.0" */ -\"@@"(Js.log, Js.Float.toPrecisionWithPrecision(0., ~digits=2)) +Js.Float.toPrecisionWithPrecision(0., ~digits=2)->Js.log ``` ## toString @@ -196,7 +196,7 @@ Returns a `string` representing the given value in fixed-point (usually). ```res example /* prints "12345.6789" */ -\"@@"(Js.log, Js.Float.toString(12345.6789)) +Js.Float.toString(12345.6789)->Js.log ``` ## toStringWithRadix @@ -213,22 +213,23 @@ Raises `RangeError` if `radix` is not in the range \[2, 36\] (inclusive). ```res example /* prints "110" */ -\"@@"(Js.log, Js.Float.toStringWithRadix(6., ~radix=2)) +Js.Float.toStringWithRadix(6., ~radix=2)->Js.log ``` ```res example /* prints "11.001000111101011100001010001111010111000010100011111" */ -\"@@"(Js.log, Js.Float.toStringWithRadix(3.14, ~radix=2)) +Js.Float.toStringWithRadix(3.14, ~radix=2)->Js.log ``` ```res example /* prints "deadbeef" */ -\"@@"(Js.log, Js.Float.toStringWithRadix(3735928559., ~radix=16)) +Js.Float.toStringWithRadix(3735928559., ~radix=16)->Js.log + ``` ```res example /* prints "3f.gez4w97ry0a18ymf6qadcxr" */ -\"@@"(Js.log, Js.Float.toStringWithRadix(123.456, ~radix=36)) +Js.Float.toStringWithRadix(123.456, ~radix=36)->Js.log ``` ## fromString