public double SquareDistanceTo(Locatable locatable) { var xDiff = Latitude - locatable.Latitude; var yDiff = Longitude - locatable.Longitude; return((xDiff * xDiff) + (yDiff * yDiff)); }
public double DistanceTo(Locatable locatable) { return(Math.Sqrt(SquareDistanceTo(locatable))); }