FunctionGraph constructor

FunctionGraph({
  1. required double function(
    1. double
    ),
  2. double stepSize = 0.01,
  3. double xMin = -FRAME_X_RADIUS,
  4. double xMax = FRAME_X_RADIUS,
  5. double dt = 1e-8,
  6. List<double> discontinuities = const [],
  7. Color color = WHITE,
})

Implementation

FunctionGraph({
  required this.function,
  double stepSize = 0.01, // use a step size <= 0 for automatic step size
  double xMin = -FRAME_X_RADIUS,
  double xMax = FRAME_X_RADIUS,
  double dt = 1e-8,
  List<double> discontinuities = const [],
  Color color = WHITE,
}) : super(
          stepSize: stepSize,
          tMin: xMin,
          tMax: xMax,
          dt: dt,
          discontinuities: discontinuities,
          color: color,
          parametricFunction: (double t) => Vector3(t, function(t), 0));