Created
February 23, 2017 18:25
-
-
Save hclewk/f931a7df35d26cf678043baec779f8ea to your computer and use it in GitHub Desktop.
Event Collision Detection Algorithm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//a.start, a.end, b.start, b.end are all DateTime's | |
bool hasCollision = a.start <= b.start && a.end > b.start || b.start <= a.start && b.end > a.start; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment