ee.Number.abs

Computes the absolute value of the input.

UsageReturns
Number.abs()Number
ArgumentTypeDetails
this: inputNumber

The input value.

Examples

JavaScript

print(ee.Number(-1).abs());  // [1]
print(ee.Number(0).abs());  // [0]
print(ee.Number(2.3).abs());  // [2.3]

Python

# Your example goes here!