Array2D<T> constructor

Array2D<T>(
  1. int width,
  2. int height,
  3. T value
)

Creates a new array with width, height elements initialized to value.

Implementation

Array2D(int width, int height, T value)
    : bounds = Rect(0, 0, width, height),
      _elements = List<T>.filled(width * height, value);