ee.Number.bitwiseXor

計算輸入值的位元互斥或運算。

用量傳回
Number.bitwiseXor(right)數字
引數類型詳細資料
這個:left數字左側值。
right數字右側值。

範例

程式碼編輯器 (JavaScript)

/**
 * Unsigned 8-bit type example.
 *
 * 25 as binary:         00011001
 * 21 as binary:         00010101
 * Only one digit is 1?: 00001100
 *
 * 00001100 is unsigned 8-bit binary for 12.
 */

print(ee.Number(25).bitwiseXor(21));

Python 設定

請參閱 Python 環境頁面,瞭解 Python API 和如何使用 geemap 進行互動式開發。

import ee
import geemap.core as geemap

Colab (Python)

"""Unsigned 8-bit type example.

25 as binary:         00011001
21 as binary:         00010101
Only one digit is 1?: 00001100

00001100 is unsigned 8-bit binary for 12.
"""

print(ee.Number(25).bitwiseXor(21).getInfo())