Skip to content

Instantly share code, notes, and snippets.

@krk
Created June 27, 2017 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krk/5a04887c50564763a3aa8afb2db16a09 to your computer and use it in GitHub Desktop.
Save krk/5a04887c50564763a3aa8afb2db16a09 to your computer and use it in GitHub Desktop.
public static Coordinate operator +(Coordinate c1, Coordinate c2)
{
DecimalDegreeCoordinate dd1 = (DecimalDegreeCoordinate)TypeDescriptor.GetConverter(c1).ConvertTo(c1, typeof(DecimalDegreeCoordinate));
DecimalDegreeCoordinate dd2 = (DecimalDegreeCoordinate)TypeDescriptor.GetConverter(c2).ConvertTo(c2, typeof(DecimalDegreeCoordinate));
return new DecimalDegreeCoordinate(dd1.lat + dd2.lat, dd1.lon + dd2.lon);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment