Scratch for Java

Operators::round()

The standard rules of rounding are followed; decimals that are .5 or higher are rounded up, whereas decimals less than .5 are rounded down.

Syntax

Java

.round(x)
.round(x, precision)

Parameters

Name Data Type Description
x double a value
precision int the number of decimal places to round to

Return

int

round()