ee.Number.rightShift

Calcola lo spostamento a destra con segno di v1 di v2 bit.

UtilizzoResi
Number.rightShift(right)Numero
ArgomentoTipoDettagli
questo: leftNumeroIl valore a sinistra.
rightNumeroIl valore a destra.

Esempi

Editor di codice (JavaScript)

/**
 * Unsigned 8-bit type example.
 *
 * 20 as binary:   00010100
 * Right shift 2:  00000101
 *
 * 00000101 is binary for 5.
 */

print(ee.Number(20).rightShift(2));  // 5

Configurazione di Python

Consulta la pagina Ambiente Python per informazioni sull'API Python e sull'utilizzo di geemap per lo sviluppo interattivo.

import ee
import geemap.core as geemap

Colab (Python)

"""Unsigned 8-bit type example.

20 as binary:   00010100
Right shift 2:  00000101

00000101 is binary for 5.
"""

print(ee.Number(20).rightShift(2).getInfo())  # 5