Revit.SDK.Samples.CurtainWallGrid.CS.GridDrawing.IsPointsEqual C# (CSharp) Méthode

IsPointsEqual() private méthode

judge whether the 2 points are equal (have the same coordinate) (as the X & Y of the Point class are both int values, so needn't use AlmostEqual)
private IsPointsEqual ( System pa, System pb ) : bool
pa System /// the point to be checked with another for equality ///
pb System /// the point to be checked with another for equality ///
Résultat bool
        private bool IsPointsEqual(System.Drawing.Point pa, System.Drawing.Point pb)
        {
            int ax = pa.X;
             int ay = pa.Y;
             int bx = pb.X;
             int by = pb.Y;

             float result = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);

             // the distance of the 2 points is greater than 0, they're not equal
             if (/*result > 1*/result != 0)
             {
            return false;
             }
             // the distance of the 2 points is 0, they're equal
             else
             {
            return true;
             }
        }