Kernel_23: Exploit Uncertain in collinear_3()

This commit is contained in:
Andreas Fabri 2023-10-23 14:45:26 +01:00
parent a0ca27e40a
commit 25ad1dc064
1 changed files with 5 additions and 3 deletions

View File

@ -102,11 +102,13 @@ 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 ,
return is_zero & CGAL_AND( sign_of_determinant(dpx, dqx, dpz, dqz) == ZERO ,
sign_of_determinant(dpy, dqy, dpz, dqz) == ZERO );
}