truncate#
- geetools.ee_number.NumberAccessor.truncate(nbDecimals=2)#
Truncate a number to a given number of decimals.
- Parameters:
nbDecimals (int | ee.Number) – The number of decimals to truncate to.
- Returns:
The truncated number.
- Return type:
Examples
import ee, geetools from geetools.utils import initialize_documentation initialize_documentation() n = ee.Number(1.23456).geetools.truncate(3) n.getInfo()
1.234