ee.Number.leftShift

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

UtilisationRenvoie
Number.leftShift(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
 * Left shift 2:  01010000
 *
 * 01010000 is binary for 80.
 */

print(ee.Number(20).leftShift(2));  // 80

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
Left shift 2:  01010000

01010000 is binary for 80.
"""

print(ee.Number(20).leftShift(2).getInfo())  # 80