ee.Number.and

Returns 1 iff both values are non-zero.

UsageReturns
Number.and(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(one.and(0));  // 0
print(zero.and(0));  // 0
print(zero.and(1));  // 0

print(one.and(1));  // 1
print(one.and(2.3));  // 1
print(one.and(-1));  // 1
print(ee.Number(4.5).and(one));  // 1

Python

# Your example goes here!