Module:Color/utils/bitwise: Revision history

From Space Station 14 Wiki

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

24 May 2025

  • curprev 07:5507:55, 24 May 2025 Aliser talk contribs 1,523 bytes +1,523 Created page with "-- Implementations of bitwise operators so that lua-color can be used -- with Lua 5.1 and LuaJIT 2.1.0-beta3 (e.g. inside Neovim). -- Code taken directly from: -- https://stackoverflow.com/questions/5977654/how-do-i-use-the-bitwise-operator-xor-in-lua local function bit_xor(a, b) local p, c = 1, 0 while a > 0 and b > 0 do local ra, rb = a % 2, b % 2 if ra ~= rb then c = c + p end a, b, p = (a - ra) / 2, (b - rb) / 2, p * 2 end if a < b the..."