Skip to content

Commit

Permalink
h3d.col.Seg: Include z in distance check
Browse files Browse the repository at this point in the history
  • Loading branch information
veitikka authored and TothBenoit committed Oct 11, 2024
1 parent 4f83b4d commit 7ceae5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion h3d/col/Seg.hx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Seg {
else if( t > 1 ) {
p.distanceSq(p2);
} else
p.distanceSq(new Point(p1.x + t * (p2.x - p1.x), p1.y + t * (p2.y - p1.y)));
p.distanceSq(new Point(p1.x + t * (p2.x - p1.x), p1.y + t * (p2.y - p1.y), p1.z + t * (p2.z - p1.z)));
}

public inline function distance( p : Point ) {
Expand Down

0 comments on commit 7ceae5d

Please sign in to comment.