We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 912c21d commit c77a748Copy full SHA for c77a748
Array2D/Array2D.swift
@@ -19,6 +19,9 @@ public struct Array2D<T> {
19
return array[row*columns + column]
20
}
21
set {
22
+ precondition(row < rows, "Row \(row) Index is out of range. Array<T>(columns: \(columns), rows:\(rows))")
23
+ precondition(column < columns, "Column \(column) Index is out of range. Array<T>(columns: \(columns), rows:\(rows))")
24
+
25
array[row*columns + column] = newValue
26
27
0 commit comments