@@ -46,7 +46,7 @@ where CRS: TwoDimensionalCRS
46
46
init ( x: X , y: Y )
47
47
}
48
48
49
- public struct Coordinates2D < CRS> : TwoDimensionalCoordinates
49
+ public struct Coordinates2DOf < CRS> : TwoDimensionalCoordinates
50
50
where CRS: TwoDimensionalCRS
51
51
{
52
52
public typealias X = CRS . CoordinateSystem . Axis1 . Value
@@ -71,12 +71,12 @@ where CRS: TwoDimensionalCRS
71
71
}
72
72
73
73
// Zeroable
74
- public extension Coordinates2D {
74
+ public extension Coordinates2DOf {
75
75
static var zero : Self { Self . init ( x: . zero, y: . zero) }
76
76
}
77
77
78
78
// AdditiveArithmetic
79
- public extension Coordinates2D {
79
+ public extension Coordinates2DOf {
80
80
static func + ( lhs: Self , rhs: Self ) -> Self {
81
81
Self . init ( x: lhs. x + rhs. x, y: lhs. y + rhs. y)
82
82
}
@@ -85,7 +85,7 @@ public extension Coordinates2D {
85
85
}
86
86
}
87
87
// MultiplicativeArithmetic
88
- public extension Coordinates2D {
88
+ public extension Coordinates2DOf {
89
89
static func * ( lhs: Self , rhs: Self ) -> Self {
90
90
Self . init ( x: lhs. x * rhs. x, y: lhs. y * rhs. y)
91
91
}
@@ -95,33 +95,33 @@ public extension Coordinates2D {
95
95
}
96
96
97
97
// InitializableByInteger
98
- public extension Coordinates2D {
98
+ public extension Coordinates2DOf {
99
99
init < Source: BinaryInteger > ( _ value: Source ) {
100
100
self . init ( x: . init( value) , y: . init( value) )
101
101
}
102
102
}
103
103
// InitializableByFloatingPoint
104
- public extension Coordinates2D {
104
+ public extension Coordinates2DOf {
105
105
init < Source: BinaryFloatingPoint > ( _ value: Source ) {
106
106
self . init ( x: . init( value) , y: . init( value) )
107
107
}
108
108
}
109
109
110
110
// CustomStringConvertible & CustomDebugStringConvertible
111
- public extension Coordinates2D {
111
+ public extension Coordinates2DOf {
112
112
var description : String { String ( describing: self . components) }
113
113
var debugDescription : String { String ( reflecting: self . components) }
114
114
}
115
115
116
- public extension Coordinates2D where CRS: GeographicCRS {
116
+ public extension Coordinates2DOf where CRS: GeographicCRS {
117
117
var latitude : X { self . x }
118
118
var longitude : Y { self . y }
119
119
init ( latitude: X , longitude: Y ) {
120
120
self . init ( x: latitude, y: longitude)
121
121
}
122
122
}
123
123
124
- public extension Coordinates2D
124
+ public extension Coordinates2DOf
125
125
where CRS: GeographicCRS ,
126
126
Self. Y: AngularCoordinateComponent
127
127
{
@@ -147,7 +147,7 @@ where CRS: ThreeDimensionalCRS
147
147
init ( x: X , y: Y , z: Z )
148
148
}
149
149
150
- public struct Coordinates3D < CRS: ThreeDimensionalCRS > : ThreeDimensionalCoordinates {
150
+ public struct Coordinates3DOf < CRS: ThreeDimensionalCRS > : ThreeDimensionalCoordinates {
151
151
public typealias X = CRS . CoordinateSystem . Axis1 . Value
152
152
public typealias Y = CRS . CoordinateSystem . Axis2 . Value
153
153
public typealias Z = CRS . CoordinateSystem . Axis3 . Value
@@ -174,12 +174,12 @@ public struct Coordinates3D<CRS: ThreeDimensionalCRS>: ThreeDimensionalCoordinat
174
174
}
175
175
176
176
// Zeroable
177
- public extension Coordinates3D {
177
+ public extension Coordinates3DOf {
178
178
static var zero : Self { Self . init ( x: . zero, y: . zero, z: . zero) }
179
179
}
180
180
181
181
// AdditiveArithmetic
182
- public extension Coordinates3D {
182
+ public extension Coordinates3DOf {
183
183
static func + ( lhs: Self , rhs: Self ) -> Self {
184
184
Self . init ( x: lhs. x + rhs. x, y: lhs. y + rhs. y, z: lhs. z + rhs. z)
185
185
}
@@ -188,7 +188,7 @@ public extension Coordinates3D {
188
188
}
189
189
}
190
190
// MultiplicativeArithmetic
191
- public extension Coordinates3D {
191
+ public extension Coordinates3DOf {
192
192
static func * ( lhs: Self , rhs: Self ) -> Self {
193
193
Self . init ( x: lhs. x * rhs. x, y: lhs. y * rhs. y, z: lhs. z * rhs. z)
194
194
}
@@ -198,20 +198,20 @@ public extension Coordinates3D {
198
198
}
199
199
200
200
// InitializableByInteger
201
- public extension Coordinates3D {
201
+ public extension Coordinates3DOf {
202
202
init < Source: BinaryInteger > ( _ value: Source ) {
203
203
self . init ( x: . init( value) , y: . init( value) , z: . init( value) )
204
204
}
205
205
}
206
206
// InitializableByFloatingPoint
207
- public extension Coordinates3D {
207
+ public extension Coordinates3DOf {
208
208
init < Source: BinaryFloatingPoint > ( _ value: Source ) {
209
209
self . init ( x: . init( value) , y: . init( value) , z: . init( value) )
210
210
}
211
211
}
212
212
213
213
// CustomStringConvertible & CustomDebugStringConvertible
214
- public extension Coordinates3D {
214
+ public extension Coordinates3DOf {
215
215
var description : String { String ( describing: self . components) }
216
216
var debugDescription : String { String ( reflecting: self . components) }
217
217
}
@@ -344,6 +344,7 @@ public enum GeocentricCartesian3DCS: ThreeDimensionalCS, GeocentricCS {
344
344
public static let epsgName : String = " Cartesian 3D CS (geocentric) "
345
345
public static let epsgCode : Int = 6500
346
346
}
347
+ public typealias EPSG6500 = GeocentricCartesian3DCS
347
348
348
349
public enum Ellipsoidal3DCS : ThreeDimensionalCS , GeographicCS {
349
350
public typealias Axis1 = GeodeticLatitude
@@ -352,13 +353,15 @@ public enum Ellipsoidal3DCS: ThreeDimensionalCS, GeographicCS {
352
353
public static let epsgName : String = " Ellipsoidal 3D CS "
353
354
public static let epsgCode : Int = 6423
354
355
}
356
+ public typealias EPSG6423 = Ellipsoidal3DCS
355
357
356
358
public enum Ellipsoidal2DCS : TwoDimensionalCS , GeographicCS {
357
359
public typealias Axis1 = GeodeticLatitude
358
360
public typealias Axis2 = GeodeticLongitude
359
361
public static let epsgName : String = " Ellipsoidal 2D CS "
360
362
public static let epsgCode : Int = 6422
361
363
}
364
+ public typealias EPSG6422 = Ellipsoidal2DCS
362
365
363
366
// MARK: Axes
364
367
0 commit comments