A TypeScript implementation of Bentley-Ottmann algorithm, ported from CompGeom.
Install TypeScript compiler:
npm install -g typescript
Compile TypeScript sources:
tsc -p .
Run test/boot.js
:
cd /path/to/project/
node test/boot.js
- Common lines (PASSED)
- Vertical and horizontal lines only (PASSED)
- Overlapped lines (PASSED)
- Lines whose slopes are very close (FAILED)
- Random lines (FAILED) *(Notice that the failing cases are matched with test #4.)