ee.Number.round

Oblicza liczbę całkowitą najbliższą wartości wejściowej.

WykorzystanieZwroty
Number.round()Liczba
ArgumentTypSzczegóły
to: inputLiczbaWartość wejściowa.

Przykłady

Edytor kodu (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

Konfiguracja Pythona

Informacje o interfejsie Python API i używaniu geemap do interaktywnego programowania znajdziesz na stronie Środowisko Python.

import ee
import geemap.core as geemap

Colab (Python)

print('10.4 rounds down:', ee.Number(10.4).round().getInfo())  # 10
print('10.5 rounds up:', ee.Number(10.5).round().getInfo())  # 11
print('10.9 rounds up:', ee.Number(10.9).round().getInfo())  # 11