Skip to content

Commit 84002c3

Browse files
committed
Merge branch 'main' into s2025
2 parents 045289d + 91784d7 commit 84002c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

GEMstack/mathutils/transforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def point_segment_distance(x,a,b) -> Tuple[float,float]:
7575
elif udotv > vnorm**2:
7676
return vector_norm(vector_sub(x,b)),1
7777
else:
78-
param = udotv/vnorm
79-
return vector_norm(vector_sub(u,vector_mul(v,param/vnorm))),param
78+
param = udotv/vnorm**2
79+
return vector_norm(vector_sub(u,vector_mul(v,param))),param
8080

8181
def rotate2d(point, angle : float, origin=None):
8282
"""Rotates a point about the origin by an angle"""

0 commit comments

Comments
 (0)