generate method

void generate(
  1. T generator(
    1. Vec
    )
)

Evaluates generator on each position in the array and sets the element at that position to the result.

Implementation

void generate(T Function(Vec) generator) {
  for (var pos in bounds) {
    this[pos] = generator(pos);
  }
}