linspace function

Array linspace({
  1. required double start,
  2. required double end,
  3. required int count,
})

Implementation

Array linspace(
    {required double start, required double end, required int count}) {
  return Array(values: [
    for (var i in range(end: count)) [interpolate(start, end, i / (count - 1))]
  ]);
}