use initial code in the function

This commit is contained in:
Sébastien Loriot 2021-09-29 16:55:36 +02:00
parent b3a0beb366
commit 65ea1e3621
1 changed files with 9 additions and 9 deletions

View File

@ -717,16 +717,16 @@ circumcenter_oriented_side_of_oriented_segmentC2(const FT& ax, const FT& ay,
const FT& p2x, const FT& p2y)
{
const FT dX = bx - ax;
const FT dY = bx - ay;
const FT R0 = p0x * p0x + p0x * p0x;
const FT R1 = p1x * p1x + p1x * p1x;
const FT R2 = p2x * p2x + p2x * p2x;
const FT denominator = (p1x - p0x) * (p2x - p0x) +
(p0x - p2x) * (p1x - p0x);
const FT dY = by - ay;
const FT R0 = p0x * p0x + p0y * p0y;
const FT R1 = p1x * p1x + p1y * p1y;
const FT R2 = p2x * p2x + p2y * p2y;
const FT denominator = (p1x - p0x) * (p2y - p0y) +
(p0x - p2x) * (p1y - p0y);
const FT det = 2 * denominator * (ax * dY - ay * dX)
- (R2 - R1) * (p0x * dX + p0x * dY)
- (R0 - R2) * (p1x * dX + p1x * dY)
- (R1 - R0) * (p2x * dX + p2x * dY);
- (R2 - R1) * (p0x * dX + p0y * dY)
- (R0 - R2) * (p1x * dX + p1y * dY)
- (R1 - R0) * (p2x * dX + p2y * dY);
return CGAL::sign(det);
}