I want to round off an
ee.Number() object to two decimal places. Right now I am using
toFloat() but that doesn't help.
It seems to work as follows, though I am unsure if this is proper rounding within the GEE:
// make an ee.Number with more than 2 decimals var number = ee.Number(76.457034897543523) // round to two decimals using divide/multiply var rounded = number.multiply(100).round().divide(100) // format to string and make string a number var rounded2 = ee.Number.parse(number.format('%.2f'))