-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path_Bit32.lua
More file actions
56 lines (46 loc) · 1.57 KB
/
_Bit32.lua
File metadata and controls
56 lines (46 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---@meta
---@class Bit32
bit32 = {}
---Performs bitwise `or` across all provided values and returns the result
---@generic T:number
---@vararg T
---@return T
function bit32.bor(...) end
---Performs bitwise `and` across all provided values and returns the result
---@vararg number
---@return number
function bit32.band(...) end
---Performs bitwise `not` on the provided value and returns the result
---@param value number
---@return number
function bit32.bnot(value) end
---Performs bitwise `xor` (exclusive or) across the provided values and returns the result
---@vararg number
---@return number
function bit32.bxor(...) end
---Performs bitwise left shift on the provided value and returns the result
---@param value number
---@param shift number
---@return number
function bit32.lshift(value, shift) end
---Performs bitwise right shift on the provided value and returns the result
---@param value number
---@param shift number
---@return number
function bit32.rshift(value, shift) end
---Performs bitwise rotate left on the provided value and returns the result
---@param value number
---@param shift number
---@return number
function bit32.rol(value, shift) end
---Performs bitwise rotate right on the provided value and returns the result
---@param value number
---@param shift number
---@return number
function bit32.ror(value, shift) end
---Sets or clears a bit mask on the provided value, and returns the result.
---@param value number
---@param mask number
---@param enable boolean If true, sets bits. Otherwise, clears bits.
---@return number
function bit32.setflag(value, mask, enable) end