Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line2D.intersectLine has null intersection type result #39

Closed
trbarrett opened this issue Aug 1, 2016 · 0 comments
Closed

Line2D.intersectLine has null intersection type result #39

trbarrett opened this issue Aug 1, 2016 · 0 comments

Comments

@trbarrett
Copy link

Hey,

Found this odd result while working on a simple canvas game.

var line1 = new toxi.geom.Line2D(
  new toxi.geom.Vec2D({x: 280, y: 319}),
  new toxi.geom.Vec2D({x: 280, y: 332}));

var line2 = new toxi.geom.Line2D(
  new toxi.geom.Vec2D({x: 280, y: 75}),
  new toxi.geom.Vec2D({x: 280, y: 325}));

var intersection = line1.intersectLine(line2);

console.log(intersection);

intersection.type is null.

Looking at the Line2D code on line 149 there's the following:

isec = new Line2D.LineIntersection(Type.COINCIDENT_NO_INTERSECT, undefined);

but Type.COINCIDENT_NO_INTERSECT isn't declared. I'd guess that's where the null is coming from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant