Round To Decimal Place(s)/en: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
<section begin="image"/>[[File:round_to_decimal_place(s).png|alt=The Round To Decimal Place(s) Block|thumb]]<section end="image"/> | |||
==Usage== | |||
<p id="tooltip">Returns the rounded value of the first input with a specified number of decimal points.</p> | <p id="tooltip">Returns the rounded value of the first input with a specified number of decimal points.</p> | ||
==Syntax== | |||
Inputs in this block: | |||
#a number, to be rounded | |||
#a number, the number of decimal places to be rounded to | |||
==Example== | |||
[[File:round_to_decimal_place(s)_example.gif|alt=Round To Decimal Place(s) example gif|thumb]] | |||
[[File:round_to_decimal_place(s)_example.png|alt=Round To Decimal Place(s) example code|thumb]] | |||
In this model, a new random decimal is produced whenever the “Generate Decimal” button is pushed, and that decimal is then rounded to three decimal points whenever the “Round Decimal” button is pushed. This feature is often useful in making data easier to display. | |||
[[Category:Math]] | [[Category:Math]] | ||
[[Category:Code Block]] | [[Category:Code Block]] |
Latest revision as of 18:36, 14 August 2023
Usage
Returns the rounded value of the first input with a specified number of decimal points.
Syntax
Inputs in this block:
- a number, to be rounded
- a number, the number of decimal places to be rounded to
Example
In this model, a new random decimal is produced whenever the “Generate Decimal” button is pushed, and that decimal is then rounded to three decimal points whenever the “Round Decimal” button is pushed. This feature is often useful in making data easier to display.