Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions DelaunayVoronoi/Triangle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,12 @@ public bool SharesEdgeWith(Triangle triangle)

public bool IsPointInsideCircumcircle(Point point)
{
var d_squared = (point.X - Circumcenter.X) * (point.X - Circumcenter.X) +
(point.Y - Circumcenter.Y) * (point.Y - Circumcenter.Y);
var dx = point.X - Circumcenter.X;
var dy = point.Y - Circumcenter.Y;

var d_squared = dx * dx + dy * dy;

return d_squared < RadiusSquared;
}
}
}
}