Skip to content

Commit

Permalink
Kernel_23: Exploit Uncertain in collinear_3()
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Oct 23, 2023
1 parent a0ca27e commit 25ad1dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@ collinearC3(const FT &px, const FT &py, const FT &pz,
FT dqx = qx-rx;
FT dpy = py-ry;
FT dqy = qy-ry;
if (sign_of_determinant(dpx, dqx, dpy, dqy) != ZERO)

auto is_zero = sign_of_determinant(dpx, dqx, dpy, dqy) == ZERO;
if (certainly_not(is_zero))
return false;
FT dpz = pz-rz;
FT dqz = qz-rz;
return CGAL_AND( sign_of_determinant(dpx, dqx, dpz, dqz) == ZERO ,
sign_of_determinant(dpy, dqy, dpz, dqz) == ZERO );
return is_zero & CGAL_AND( sign_of_determinant(dpx, dqx, dpz, dqz) == ZERO ,
sign_of_determinant(dpy, dqy, dpz, dqz) == ZERO );
}

template < class FT >
Expand Down

0 comments on commit 25ad1dc

Please sign in to comment.