public static float PointDistanceNoSqrt(PointStructFloat pointOne, PointStructFloat pointTwo) { float x = pointOne.X - pointTwo.X; float y = pointOne.Y - pointTwo.Y; return((x * x) + (y * y)); }
public void test4() { PointStructFloat point1 = new PointStructFloat { X = 10, Y = 5 }; PointStructFloat point2 = new PointStructFloat { X = 15, Y = 10 }; PointStructFloat.PointDistanceNoSqrt(point1, point2); }