Skip to content

Commit 3466da5

Browse files
committed
point3d: signed dist to plane
1 parent 6cf4072 commit 3466da5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎code/geometry/primitives3d.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ struct point3d {
3030
return ((*this - A) * (*this - B)).length() / A.distTo(B);}
3131
double signedDistTo(PL(A,B,C)) const {
3232
// A, B and C must not be collinear
33-
point3d N = (B-A)*(C-A);
34-
double D = A%N;
33+
point3d N = (B-A)*(C-A); double D = A%N;
3534
return ((*this)%N - D)/N.length();}
3635
point3d normalize(double k = 1) const {
3736
// length() must not return 0

0 commit comments

Comments
 (0)