1
0

CellPosition.swift 558 B

1234567891011121314151617
  1. /// The position of a cell in a table (with row and column numbers starting from 0).
  2. public struct CellPosition {
  3. /// The row number (starting from 0).
  4. public var row: Int
  5. /// The column number (starting from 0).
  6. public var column: Int
  7. /// Creates a cell position from a row and column number.
  8. ///
  9. /// - Parameters:
  10. /// - row: The row number (starting from 0).
  11. /// - column: The column number (starting from 0).
  12. public init(_ row: Int, _ column: Int) {
  13. self.row = row
  14. self.column = column
  15. }
  16. }