TileRangeIterator
public struct TileRangeIterator : IteratorProtocol
Iterator of a TileRange.
-
Range for the counter
Declaration
Swift
let range: TileRange
-
Current counter value
Declaration
Swift
var counter: UInt64
-
Max value counter can take.
Declaration
Swift
let maxCounter: UInt64
-
Number of columns
Declaration
Swift
let columns: TileNumber
-
Number of rows
Declaration
Swift
let rows: TileNumber
-
Initializer of the iterator. Sets
range
,counter
,maxCounter
anddiffX
Declaration
Swift
init(_ range: TileRange)
-
The function that is required by the Iterator protocol.
Todo
because there are no validations of the range in TileRange, this function may fail. Pending to fix it.
See also
Declaration
Swift
public mutating func next() -> TileCoords?
Return Value
the
TileCoord
for the current iteration.