Skip to content

Instantly share code, notes, and snippets.

@sguzman
Created April 3, 2015 17:04
Show Gist options
  • Select an option

  • Save sguzman/1cb713c81ae716c86988 to your computer and use it in GitHub Desktop.

Select an option

Save sguzman/1cb713c81ae716c86988 to your computer and use it in GitHub Desktop.
Succinct overlap checker in javascript
/**
* @param {number} a
* @param {number} b
* @param {number} c
* @param {number} d
* @return {bool}
*/
function overlap(a, b, c, d) {
return b >= c && d >= a;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment