Round To Decimal Place(s): Difference between revisions
(updates from Blockument) |
(Marked this version for translation) |
||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:3--> | |||
<section begin="image"/>[[File:round_to_decimal_place(s).png|alt=The Round To Decimal Place(s) Block|thumb]]<section end="image"/> | <section begin="image"/>[[File:round_to_decimal_place(s).png|alt=The Round To Decimal Place(s) Block|thumb]]<section end="image"/> | ||
==Usage== | ==Usage== <!--T:4--> | ||
<!--T:2--> | <!--T:2--> | ||
<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== | ==Syntax== <!--T:5--> | ||
<!--T:6--> | |||
Inputs in this block: | Inputs in this block: | ||
#a number, to be rounded | #a number, to be rounded | ||
#a number, the number of decimal places to be rounded to | #a number, the number of decimal places to be rounded to | ||
==Example== | ==Example== <!--T:7--> | ||
<!--T:8--> | |||
[[File:round_to_decimal_place(s)_example.gif|alt=Round To Decimal Place(s) example gif|thumb]] | [[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]] | [[File:round_to_decimal_place(s)_example.png|alt=Round To Decimal Place(s) example code|thumb]] | ||
<!--T:9--> | |||
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. | 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. | ||
Latest revision as of 16:55, 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.