Jump to content

Module:LoadData: Revision history

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 December 2024

  • curprev 04:0104:01, 24 December 2024 Sonic City talk contribs 1,765 bytes +1,765 Created page with "local p = {} -- Finds the next key key <= or >= the given i. -- operator is ±1 local function findItemRange(data, i, operator) local bestIndex = nil i = i * operator for k, v in pairs(data) do local kop = type(k) == 'number' and k * operator if kop and kop <= i and (bestIndex == nil or kop > bestIndex * operator) then bestIndex = k end end if bestIndex then return data[bestIndex] else return nil end end local function..."