1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Don’t transpose the coordinate system.

This commit is contained in:
Rob Rix 2015-11-05 16:12:53 -05:00
parent f4a8bcdc90
commit ee285d79dd

View File

@ -41,8 +41,8 @@ public struct Matrix<A, I: ForwardIndexType> {
private func constructRowMajor<A, I: ForwardIndexType>(across: Range<I>, down: Range<I>, @noescape forEach: (I, I) -> A) -> [A] {
var values: [A] = []
values.reserveCapacity(Int(across.count.toIntMax()) * Int(down.count.toIntMax()))
for j in across {
for i in down {
for j in down {
for i in across {
values.append(forEach(i, j))
}
}