2.0.0 • Published 10 years ago
exact-segment-intersect v2.0.0
exact-segment-intersect
Exactly computes the intersection of a pair of line segments as a homogeneous vector of non-overlapping increasing sequences.
Example
var exactIntersect = require("exact-segment-intersect")
var a = [-1,0]
var b = [1,0]
var c = [0,-1]
var d = [0,1]
console.log(exactIntersect(a, b, c, d))Output:
[ [0], [0], [1] ]Install
npm install exact-segment-intersectAPI
require("exact-segment-intersect")(a,b,c,d)
Exactly computes the intersection of the line segments [a,b] and [c,d]
a,bare the vertices of the first segmentc,dare the vertices of the second segment
Returns A homogeneous 3 vector encoding the exact point of intersection
Credits
(c) 2014 Mikola Lysenko. MIT License

