2023-08-19 04:48:46 +02:00
|
|
|
--TODO: implement iton graphics object instead of free function
|
2022-03-27 03:54:02 +02:00
|
|
|
local function areaOverlap(x, y, areaX, areaY, areaW, areaH)
|
|
|
|
return x > areaX and y > areaY and x < areaX + areaW and y < areaY + areaH
|
|
|
|
end
|
|
|
|
|
2023-08-19 04:48:46 +02:00
|
|
|
--modulo operation for table index value
|
2022-04-11 18:47:26 +02:00
|
|
|
local function modIndex(index, mod)
|
|
|
|
return (index - 1) % mod + 1
|
|
|
|
end
|
|
|
|
|
2021-11-20 22:43:11 +01:00
|
|
|
return {
|
2022-04-03 23:24:17 +02:00
|
|
|
areaOverlap = areaOverlap,
|
2022-04-11 18:47:26 +02:00
|
|
|
modIndex = modIndex,
|
2022-04-27 02:03:42 +02:00
|
|
|
}
|