Skip to content

Commit

Permalink
Merge pull request #7822 from afabri/Filtered_kernel-collinear-GF
Browse files Browse the repository at this point in the history
Kernel_23: Exploit Uncertain in collinear_3()
  • Loading branch information
lrineau committed Nov 6, 2023
2 parents bd90568 + 25ad1dc commit 58bf7af
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 58bf7af

Please sign in to comment.