From 71917426b4c59ee2a2c3ac1a1900ac69ee35e907 Mon Sep 17 00:00:00 2001 From: HansM Date: Sun, 16 Jun 2019 15:50:47 +0200 Subject: [PATCH] Fixed float reference page. Fixes https://github.com/arduino/reference-en/issues/624. --- Language/Variables/Data Types/float.adoc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Language/Variables/Data Types/float.adoc b/Language/Variables/Data Types/float.adoc index fcf41be45..8882397ed 100644 --- a/Language/Variables/Data Types/float.adoc +++ b/Language/Variables/Data Types/float.adoc @@ -59,15 +59,7 @@ x = 1; y = x / 2; // y now contains 0, ints can't hold fractions z = (float)x / 2.0; // z now contains .5 (you have to use 2.0, not 2) ---- - - --- -// HOW TO USE SECTION ENDS - - -// SEE ALSO SECTION STARTS -[#see_also] --- +[%hardbreaks] [float] === Notes and Warnings @@ -99,6 +91,16 @@ int y = round(x); // 3 Floating point math is also much slower than integer math in performing calculations, so should be avoided if, for example, a loop has to run at top speed for a critical timing function. Programmers often go to some lengths to convert floating point calculations to integer math to increase speed. +-- +// HOW TO USE SECTION ENDS + + + + +// SEE ALSO SECTION STARTS +[#see_also] +-- + [%hardbreaks] [float] === See also