ee.Number.subtract

Subtracts the second value from the first.

UsageReturns
Number.subtract(right)Number
ArgumentTypeDetails
this: leftNumber

The left-hand value.

rightNumber

The right-hand value.

Examples

JavaScript

print(ee.Number(0).subtract(0.0));  // 0
print(ee.Number(0).subtract(1.2));  // -1.2
print(ee.Number(0).subtract(-3.4));  // 3.4

// Converting to a smaller integer type does not limit the range
print(ee.Number(0).toUint8().subtract(ee.Number(1).toUint8()));  // -1
print(ee.Number(255).toUint8().subtract(-123));  // 378

Python

# Your example goes here!