Create a method to clean up an ill-formed range, ie a range whose bounds
are not finite, or where max <= min.
Change-Id: If4525e65f95385cfa970be72bbcc21ad84286bfa
This method, that prevented the graph from panning when moving the
cursor for the first time, caused more problems than it solved.
For instance, the graph for 1/(1-x) was not symmetrical because of it.
Change-Id: Ibb22e38ec0ace6b219c0e42dda481c98b5f717f0
Rework the logic so that :
- an undefined function will be displayed with a clealry defined
null range.
- display both an undefined function and a correct function at the
same time will not affect the correct range.
Change-Id: Ife9dc0d2ace667cab5a6b8826347078fca33e4d5
Method yForCursorFirstMove is supposed to expand the window so that the
first move of the cursor won't cause it to pan. It now filters extreme
values to prevent the original window to be totally squashed, such as
with the drawing of e^x and (x-100)(x+10) at the same time.
Change-Id: Icd6c26b01475a112c4231f293e03ab31d80d5e51
Add a clause in InterestingRangesForDisplay to detect strong variations.
This improve the graph for x^x or x^2+x+1 for instance.
Change-Id: I74214c2382cfe4b0e2603556dd8c6cbd450effc0
Added a tolerance when checking orthonormality, so that ranges that are
nearly orthonormal will be made orthonormal.
Change-Id: Ie3bf076086561e3ff6374e7daa9dd1a884c52d5a
When displaying f(x) = undef, the range now defaults to an orthonormal
range, centered on the origin, with axis unit 1.
Change-Id: Ie3515be0572af4849b8ebd113449f4444755b34f
Restore the permanence of the cursor between accesses to the graph
window.
The cursor used to be reset when the models had been modified. As there
is no longer a system in place to track these modifications, we manually
check if there is a curve beneath the cursor before reseting it.
Change-Id: I6f71fc17744b5bf1ee552c82126bb4a08b823629
Change some parameters to improve the output of
RangeWithRatioForDisplay. Notably, change how the size of the range is
weighed.
Change-Id: I7695c61c3f93482f3fed9c7d2183642573b02cff
When looking for a range with a certain ratio using
RangeWithRatioForDisplay, instead of looking for ranges of the form
0.01*1.1^n, search for ranges of the form a*10^k, with a being either 1,
2, or 5.
Change-Id: I2eaa229574a9a6aa4afa6eb1a3d57365d3d52801
The normalized status would not be refreshed after a call to setDefault
triggered by InteractiveCurveViewController::viewWillAppear.
Change-Id: I923ef3ca0585dbcc1f32b992d7dd1f4a3a206532
The method FunctionGraphController::yRangeForCursorFirstMove expands the
Y range to include the values of the first cursor moves on the left and
the right of the center. It has been modified to preserve
orthonormality.
Change-Id: I898ab9721e45e2acde261f8b94b80cab81b39a92
Added a method to Zoom to set a range to a specific ratio. This method
is used by InteractiveCurveViewRange::normalize.
Change-Id: Id3029439294ece02ea19fb6c6de90b9edc85d771
As margins are added later in InteractiveCurveViewRange::setDefault,
rounding abscissa at this point is premature.
Change-Id: I411dd014b712649efd55cb995ed7a9c5c14a7f43
The ability to perform a range search without changing the X range was
only there to accomodate the Yauto feature.
Change-Id: I8c2b61b447fbd3dc1f4e303dff06d1a8d6e7a4f2
Regression's automatic Y range used to rely on the Yauto feature. Since
it has been removed, it is now done in Store::setDefault.
Change-Id: I1b6653bb8ebe0ba99decff05bae29bd5a69a9f6c
The computation of Sequence's graph default Y range used to rely on
Yauto. As this feature does not exist anymore, this work is now done int
Sequence::GraphController::interestingRanges.
Change-Id: Idba8560d5f25d0bf34dd0e1dd98c2af67f427709
The Auto mode for curve ranges must be deactivated when moving the
cursor outside the screen and when activating navigation (formerly
Zoom).
Change-Id: I281a1d069c2ebcc30e7ead469c4f48438054d7c2
This method of InteractiveCurveViewRangeDelegate was only used to
compute the Y range when Yauto was on.
Change-Id: I9b688a87e16fc58c7d2b00eb071076b98f945df6
The graph range used to be reset to default whenever all functions were
modified. As we no longer want to reset the range without the user's
input, we do not need to track whether the functions changed at all.
/!\ As of this commit, there is no longer a way to restore the default
zoom, until a new automatic zoom button is added.
Change-Id: Ie74e8fd61e13055fa6ce2b2d1e883182d4ecffce