Created
August 1, 2018 21:49
-
-
Save LucasIron/a5cb25e5c0417567d717374a82c515ca to your computer and use it in GitHub Desktop.
Overlap for N dimensions function
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
| const overlap = baseLines => comparisonLines => baseLines.reduce((bool, baseLine, index) => { | |
| const comparisonLine = comparisonLines[index]; | |
| if (bool === true) return Math.max(baseLine[0], comparisonLine[0]) < Math.min(baseLine[1], comparisonLine[1]); | |
| else return false; | |
| }, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment