jcoglan/sylvester

Problem in LineintersectionWith

Closed this issue · 1 comments

Am I something wrong in below?

LineA : (1,3)(2,9), LineB : (1,6)(2,6) , Correct intersection Point should be (1.5, 6)

var a = sv.Line.create([1,3],[2,9]);
var b = sv.Line.create([1,6],[2,6],);
console.log('intersectionWith : ', a.intersectionWith(b));
But it result
intersectionWith : [3.000000000000011, 12.000000000000052, 0]
intersects : true
pointClosestTo : [3.000000000000011, 12.000000000000052, 0]
reflectionIn :
{ anchor: [-0.800000000000003, 3.600000000000001, -1.1617635945578294e-16],
direction: [0.41216786985544684, 0.9111079228383558, 1.2601095422223854e-17] }

This intersection is correct. The first line crosses through (1,3) + (2,9) = (3,12), and so does the second line: (1,6) + (2,6) = (3,12).