multimaze/utils/calculations.lua

10 lines
244 B
Lua

local M = {}
function M.normalise_dimension(value, path_length, path_width)
local cells = (value - (path_width*2)) / path_length
cells = math.floor(cells)
local new_value = (cells*path_length)+(path_width*2)
return new_value
end
return M