ee.Number.or

Returns 1 iff either input value is non-zero.

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

The left-hand value.

rightNumber

The right-hand value.

Examples

JavaScript

var zero = ee.Number(0);
var one = ee.Number(1);

print(zero.or(0));  // 0

print(zero.or(1));  // 1
print(one.or(0));  // 1
print(one.or(1));  // 1
print(one.or(2.3));  // 1
print(one.or(-1));  // 1
print(ee.Number(4.5).or(one));  // 1

Python

# Your example goes here!