ee.Array.rightShift
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Oblicza przesunięcie bitowe w prawo z zachowaniem znaku dla poszczególnych elementów v1 o v2 bitów.
Wykorzystanie | Zwroty |
---|
Array.rightShift(right) | Tablica |
Argument | Typ | Szczegóły |
---|
to: left | Tablica | Wartość po lewej stronie. |
right | Tablica | Wartość po prawej stronie. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eThe \u003ccode\u003erightShift\u003c/code\u003e method performs a bitwise signed right shift operation on two arrays.\u003c/p\u003e\n"],["\u003cp\u003eIt shifts the elements of the 'left' array by the number of bits specified in the corresponding elements of the 'right' array.\u003c/p\u003e\n"],["\u003cp\u003eThe result is a new array containing the shifted values.\u003c/p\u003e\n"],["\u003cp\u003eThe original arrays, 'left' and 'right', remain unchanged.\u003c/p\u003e\n"]]],["The core function is an element-wise signed right shift operation. It takes two arrays, `left` and `right`, as input. `left` represents the value being shifted, and `right` specifies the number of bits to shift. The function, `Array.rightShift(right)`, calculates the signed right shift of each element in the `left` array by the corresponding number of bits specified in the `right` array, returning a new `Array` with the shifted results.\n"],null,["# ee.Array.rightShift\n\nOn an element-wise basis, calculates the signed right shift of v1 by v2 bits.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------|---------|\n| Array.rightShift`(right)` | Array |\n\n| Argument | Type | Details |\n|--------------|-------|-----------------------|\n| this: `left` | Array | The left-hand value. |\n| `right` | Array | The right-hand value. |"]]