getAt method

double getAt(
  1. int i,
  2. int j
)

Safe element accessors (bounds-checked by assert in debug)

Implementation

double getAt(int i, int j) {
  assert(i >= 0 && i < rows && j >= 0 && j < cols, 'Index out of bounds');
  return data[i * cols + j];
}