bit polyfill: tiny tweak

This commit is contained in:
Starbeamrainbowlabs 2021-07-19 00:26:52 +01:00
parent 9020948dc5
commit 73e07eb013
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -18,15 +18,16 @@ if minetest.global_exists("bit") then
bit = bit
else
bit = {}
end
bit.bits = 32
bit.powtab = { 1 }
bit.bits = 32
bit.powtab = { 1 }
for b = 1, bit.bits - 1 do
for b = 1, bit.bits - 1 do
bit.powtab[#bit.powtab + 1] = math.pow(2, b)
end
end
-- Functions
-- bit.band
if not bit.band then