Skip to content

Instantly share code, notes, and snippets.

@luckyruby
Created December 4, 2013 20:55
Show Gist options
  • Save luckyruby/7795372 to your computer and use it in GitHub Desktop.
Save luckyruby/7795372 to your computer and use it in GitHub Desktop.
def overlap?(range1_start, range1_end, range2_start, range2_end)
if (range1_start > range2_end || range1_end < range2_start)
false
else
true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment