Skip to content

Instantly share code, notes, and snippets.

@caubry
Last active January 3, 2016 19:09
Show Gist options
  • Save caubry/8506743 to your computer and use it in GitHub Desktop.
Save caubry/8506743 to your computer and use it in GitHub Desktop.
intersectRect: function (r1, r2) {
return !(r2.left > r1.right ||
r2.right < r1.left ||
r2.top > r1.bottom ||
r2.bottom < r1.top);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment