Skip to content

Commit 05d8d1d

Browse files
authored
Merge pull request #27 from RougeWare/develop
Sync Develop into Master
2 parents 367a3b3 + b39826d commit 05d8d1d

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

Sources/RectangleTools/Synthesized Conveniences/Size2DCollection.swift

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,21 @@ public protocol Size2DCollection: Collection, Size2D
6565
public struct Size2DCollectionIndex<Length: BinaryInteger> {
6666

6767
/// The position within a row of the scanline in a Size
68-
let x: Length
68+
public let x: Length
6969

7070
/// The row of a scanline in a Size
71-
let y: Length
71+
public let y: Length
72+
73+
74+
/// Creates a new index for a `Size2D`
75+
///
76+
/// - Parameters:
77+
/// - x: The position within a row of the scanline in a Size
78+
/// - y: The row of a scanline in a Size
79+
public init(x: Length, y: Length) {
80+
self.x = x
81+
self.y = y
82+
}
7283
}
7384

7485

@@ -84,6 +95,11 @@ extension Size2DCollectionIndex: Comparable {
8495

8596

8697

98+
extension Size2DCollectionIndex: Point2D {
99+
}
100+
101+
102+
87103
public extension Size2DCollection
88104
where
89105
Length: BinaryInteger,

0 commit comments

Comments
 (0)