mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[poincare/zoom] Reduce zoom artifact
Do not use the bounds of the interval when computing a refined range. As the bounds are often integers, the zoom would give strange result on some non-continuous functions (e.g. f(x) = x!). Change-Id: Ie127fe15191cb3951cff223adc8dc3172188c789
This commit is contained in:
committed by
EmilieNumworks
parent
a418602763
commit
adf28345b1
@@ -183,7 +183,7 @@ void Zoom::RefinedYRangeForDisplay(ValueAtAbscissa evaluation, float xMin, float
|
||||
float sum = 0.f;
|
||||
int pop = 0;
|
||||
|
||||
for (int i = 1; i < sampleSize; i++) {
|
||||
for (int i = 1; i < sampleSize - 1; i++) {
|
||||
x = xMin + i * step;
|
||||
y = evaluation(x, context, auxiliary);
|
||||
if (!std::isfinite(y)) {
|
||||
|
||||
Reference in New Issue
Block a user