nth static method

List<double> nth(
  1. List<double> data,
  2. int threshold
)

Returns every Nth point.

Implementation

static List<double> nth(List<double> data, int threshold) {
  final indices = nthIndices(data, threshold);
  return [for (final i in indices) data[i]];
}