1 |
|
2 |
|
3 | # Function rightLogShift
|
4 |
|
5 | Bitwise right logical shift of value x by y number of bits, `x >>> y`.
|
6 | For matrices, the function is evaluated element wise.
|
7 | For units, the function is evaluated on the best prefix base.
|
8 |
|
9 |
|
10 | ## Syntax
|
11 |
|
12 | ```js
|
13 | math.rightLogShift(x, y)
|
14 | ```
|
15 |
|
16 | ### Parameters
|
17 |
|
18 | Parameter | Type | Description
|
19 | --------- | ---- | -----------
|
20 | `x` | number | Array | Matrix | Value to be shifted
|
21 | `y` | number | Amount of shifts
|
22 |
|
23 | ### Returns
|
24 |
|
25 | Type | Description
|
26 | ---- | -----------
|
27 | number | Array | Matrix | `x` zero-filled shifted right `y` times
|
28 |
|
29 |
|
30 | ## Examples
|
31 |
|
32 | ```js
|
33 | math.rightLogShift(4, 2) // returns number 1
|
34 |
|
35 | math.rightLogShift([16, -32, 64], 4) // returns Array [1, 2, 3]
|
36 | ```
|
37 |
|
38 |
|
39 | ## See also
|
40 |
|
41 | [bitAnd](bitAnd.md),
|
42 | [bitNot](bitNot.md),
|
43 | [bitOr](bitOr.md),
|
44 | [bitXor](bitXor.md),
|
45 | [leftShift](leftShift.md),
|
46 | [rightLogShift](rightLogShift.md)
|