ee.Number.rightShift

Calcule le décalage à droite signé de v1 par v2 bits.

UtilisationRenvoie
Number.rightShift(right)Nombre
ArgumentTypeDétails
ceci : leftNombreValeur de gauche.
rightNombreValeur de droite.

Exemples

Éditeur de code (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

Configuration de Python

Consultez la page Environnement Python pour en savoir plus sur l'API Python et sur l'utilisation de geemap pour le développement interactif.

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