ee.Number.leftShift

Oblicza przesunięcie w lewo wartości v1 o v2 bitów.

WykorzystanieZwroty
Number.leftShift(right)Liczba
ArgumentTypSzczegóły
to: leftLiczbaWartość po lewej stronie.
rightLiczbaWartość po prawej stronie.

Przykłady

Edytor kodu (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

Konfiguracja Pythona

Informacje o interfejsie Python API i używaniu geemap do interaktywnego programowania znajdziesz na stronie Środowisko Python.

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