getZ method
Gets z
dimension of a flat index (see flatten).
Implementation
int getZ(int i) {
if (i < 0 || i >= numberOfElements) {
throw ArgumentError.value(i);
}
final z = this.z;
if (z == 0) {
throw StateError('No `z` index');
}
return (i ~/ (x * y)) % z;
}