Boundary画线算法,精度导致的问题修复

This commit is contained in:
艾竹
2023-04-16 14:56:53 +08:00
parent 4b8a03afb6
commit cbfbf96033
6 changed files with 40 additions and 8 deletions

View File

@@ -181,8 +181,8 @@ namespace AIStudio.Wpf.DiagramDesigner.Geometrys
/// <param name='point2'>The second PointBase to compare</param>
public static bool Equals(PointBase point1, PointBase point2)
{
return point1.X.Equals(point2.X) &&
point1.Y.Equals(point2.Y);
return Math.Abs(point1.X - point2.X) < 0.01f &&
Math.Abs(point1.Y - point2.Y) < 0.01f;
}
/// <summary>