linspace<T extends num> function

Iterable<T> linspace<T extends num>(
  1. T start,
  2. T stop, [
  3. int count = 100
])

Implementation

Iterable<T> linspace<T extends num>(T start, T stop, [int count = 100]) {
  if (start is int && stop is int) {
    return IntRange.linspace(start.toInt(), stop.toInt(), count) as Iterable<T>;
  } else {
    return DoubleRange.linspace(start.toDouble(), stop.toDouble(), count)
        as Iterable<T>;
  }
}