ee.Number.round

Computes the integer nearest to the input.

UsageReturns
Number.round()Number
ArgumentTypeDetails
this: inputNumber

The input value.

Examples

Code Editor (JavaScript)

print('10.4 rounds down', ee.Number(10.4).round());  // 10
print('10.5 rounds up', ee.Number(10.5).round());  // 11
print('10.9 rounds up', ee.Number(10.9).round());  // 11