public double PointDistanceStructDouble(PointStructDouble pointOne, PointStructDouble pointTwo) { double x = pointOne.X - pointTwo.X; double y = pointOne.Y - pointTwo.Y; return(Math.Sqrt((x * x) + (y * y))); }
public void DifferenceTwoPointStructDouble() { PointStructDouble pointOne = new PointStructDouble { X = (double)31.2, Y = (double)22.5 }; PointStructDouble pointTwo = new PointStructDouble { X = (double)14.8, Y = (double)13.3 }; PointDistanceStructDouble(pointOne, pointTwo); }