[apps/shared/function_graph_controller] Comment about the sampling step in computeYRange

This commit is contained in:
Ruben Dashyan
2019-07-19 14:51:52 +02:00
committed by EmilieNumworks
parent bc750ef2da
commit d171c2a2be

View File

@@ -84,6 +84,9 @@ InteractiveCurveViewRangeDelegate::Range FunctionGraphController::computeYRange(
range.max = xMax;
return range;
}
/* In practice, a step smaller than a pixel's width is needed for sampling
* the values of a function. Otherwise some relevant extremal values may be
* missed. */
const float step = curveView()->pixelWidth() / 2;
for (int i=0; i<functionStore()->numberOfActiveFunctions(); i++) {
ExpiringPointer<Function> f = functionStore()->modelForRecord(functionStore()->activeRecordAtIndex(i));