fix: unit conversion and indexing

This commit is contained in:
robin committed 2024-04-30 12:34:10 +02:00
1 parent 824fb967a2
commit 0aa58537b1
6 files changed
+77 -27

No files matched your search

+2 -2
View File
@@ -39,7 +39,7 @@ const Vel &UVGrid::operator[](size_t timeIndex, size_t latIndex, size_t lonIndex
or lonIndex < 0 or lonIndex >= lonSize) {
throw std::out_of_range("Index out of bounds");
}
size_t index = timeIndex * (latSize * lonSize) + latIndex * lonIndex + lonIndex;
size_t index = timeIndex * (latSize * lonSize) + latIndex * lonSize + lonIndex;
return uvData[index];
}
@@ -63,4 +63,4 @@ void UVGrid::streamSlice(ostream &os, size_t t) {
}
os << endl;
}
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.