ee.Number.or

Stay organized with collections Save and categorize content based on your preferences.
Returns 1 iff either input value is non-zero.

UsageReturns
Number.or(right)Number
ArgumentTypeDetails
this: leftNumberThe left-hand value.
rightNumberThe right-hand value.

Examples

Code Editor (JavaScript)

print('Either 0 or 5 non-zero?', ee.Number(0).or(ee.Number(5)));  // 1
print('Either 0 or 0 non-zero?', ee.Number(0).or(ee.Number(0)));  // 0