Skip to content

Commit

Permalink
Resolving at least part of issue ajwerner#1 - horizontal and vertical…
Browse files Browse the repository at this point in the history
… lines are never detected as colliding with each other
  • Loading branch information
djozis committed Apr 21, 2018
1 parent 3da1da5 commit e170d2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/ajwerner/voronoi/VoronoiEdge.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public VoronoiEdge(Point site1, Point site2) {
}

public Point intersection(VoronoiEdge that) {
if (this.m == that.m && this.b != that.b) return null; // no intersection
if (this.m == that.m && this.b != that.b && this.isVertical == that.isVertical) return null; // no intersection
double x, y;
if (this.isVertical) {
x = (this.site1.x + this.site2.x) / 2;
Expand Down

0 comments on commit e170d2b

Please sign in to comment.