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.
2 parents 86b2fe3 + c77a748 commit 01eb805Copy full SHA for 01eb805
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