samplePoints method

List<Map<String, double>> samplePoints({
  1. double xMin = -10,
  2. double xMax = 10,
  3. int numPoints = 200,
})

Sample the function at numPoints points within xMin..xMax.

Returns a list of (x, y) coordinate pairs. Points where the function is undefined (NaN, infinity) are filtered out.

Implementation

List<Map<String, double>> samplePoints({
  double xMin = -10,
  double xMax = 10,
  int numPoints = 200,
}) => samplePointSegments(
  xMin: xMin,
  xMax: xMax,
  numPoints: numPoints,
).expand((segment) => segment).toList();