Block Group: | Number Formatting |
Icon: |
![]() |
The Round block rounds a number to a specified precision.
The following properties of the Round block can take input and give output.
input specifies any real number that you want to round.
precision specifies the number of digits after the decimal to round the number to. A value of 0, less than 0, or null rounds the number to the nearest integer.
The following property of the Round block can give output but cannot take input.
The following image shows an example of the Round block. In this example, pi is rounded to a precision of three digits.