Improve getIntersection performance
Merge pull request #790 from kzhdev/performance-improvement

Improve getIntersection performance.