Redondear a Punto(s) Decimal(es)

From StarLogo Nova Wiki
This page is a translated version of the page Round To Decimal Place(s) and the translation is 20% complete.
Other languages:
The Round To Decimal Place(s) Block

Usage

Returns the rounded value of the first input with a specified number of decimal points.

Syntax

Inputs in this block:

  1. a number, to be rounded
  2. a number, the number of decimal places to be rounded to

Example

Round To Decimal Place(s) example gif
Round To Decimal Place(s) example code

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.