local utils = {}

function utils.overlap(x1, w1, x2, w2, percent)
  local half = (percent or 1)/2;
  local min1 = x1 - (w1*half);
  local max1 = x1 + (w1*half);
  local min2 = x2 - (w2*half);
  local max2 = x2 + (w2*half);
  return not ((max1 < min2) or (min1 > max2));
end

return utils
