public Length DistanceTo(Length2d other) { double dx = X.Meters - other.X.Meters; double dy = Y.Meters - other.Y.Meters; double distance = Math.Sqrt(dx * dx + dy * dy); return(Length.FromMeters(distance)); }
public static Length GetDistance(Length2d a, Length2d b) { Vector2 d = (a - b).Meters; return(Length.FromMeters(Math.Sqrt(d.X * d.X + d.Y * d.Y))); }
public bool Equals(Length2d other) { return(Meters.Equals(other.Meters)); }