Float32Matrix.filled constructor

Float32Matrix.filled(
  1. int width,
  2. int height,
  3. [double value = 0.0]
)

Constructs matrix with the given width and height.

Implementation

factory Float32Matrix.filled(int width, int height, [double value = 0.0]) {
  final data = Float32List(width * height);
  if (value != 0.0) {
    data.fillRange(0, data.length, value);
  }
  return Float32Matrix.withFloat32List(data, width: width);
}