File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ namespace PolylineAlgorithm;
1717[ DebuggerDisplay ( "{ToString()}" ) ]
1818[ StructLayout ( LayoutKind . Sequential , Pack = 8 , Size = 16 ) ]
1919public readonly struct Coordinate : IEquatable < Coordinate > {
20- private static readonly CoordinateRange _latitudeRange = new ( - 90 , 90 ) ;
21- private static readonly CoordinateRange _longitudeRange = new ( - 180 , 180 ) ;
22-
2320 /// <summary>
2421 /// Initializes a new instance of the <see cref="Coordinate"/> struct with default values (0) for <see cref="Latitude"/> and <see cref="Longitude"/>.
2522 /// </summary>
@@ -38,14 +35,6 @@ public Coordinate() {
3835 /// or when <paramref name="longitude"/> is less than -180 or greater than 180.
3936 /// </exception>
4037 public Coordinate ( double latitude , double longitude ) {
41- if ( ! _latitudeRange . IsInRange ( latitude ) ) {
42- throw new ArgumentOutOfRangeException ( nameof ( latitude ) , "" ) ; // TODO: add message
43- }
44-
45- if ( ! _longitudeRange . IsInRange ( longitude ) ) {
46- throw new ArgumentOutOfRangeException ( nameof ( longitude ) , "" ) ; // TODO: add message
47- }
48-
4938 Latitude = latitude ;
5039 Longitude = longitude ;
5140 }
You can’t perform that action at this time.
0 commit comments