The angleUnitVersion check is no longer needed, as changing the angle
unit with a trigonometric function set would leave the cursor hanging.
Change-Id: I17d99c05daeacfec953865158cdfe7706635cd32
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 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
The new zoom implemented for ContinuousFunction is now factorized inside
Function to benefit the Sequence class. The same things is done to code
added to Graph::GraphController, which is moved into
FunctionGraphController.
This removes the reimplementation of several methods, most notably
computeYRange, as the implementation for function is general enough to
work on sequences.
Change-Id: I9b8211354064f46c3fa3dde3191dcb39d627a1d2
Initial zoom for displaying curves is computed according to the
following rules :
- For polar and parametric curves, the algorithm has not changed.
Vertical and horizontal ranges are chosen in order to display the
full curve with orthonormal graduations.
- For cartesian curves, the horizontal range is chosen in order to
display all points of interest (roots, extrema, asymptotes...).
The vertical range is fitted to be able to display those points, but
also cuts out points outside of the function's order of magnitude.
Change-Id: Idf8233fc2e6586b85d34c4da152c83e75513d85c
Method InteractiveCurveViewRange::panToMakePointVisible now moves the
range of a whole number of pixels when panning horizontally. This allows
the cache of cartesian functions not to be invalidated.
Change-Id: Idb9904fef134dd13458e1f2287b0fe5145e8aec7
This is unfortunately required in several cases:
- Sometimes when we use either float and double (this should be changed)
- Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
- Because we mix pointer differences and ints
When setting the axes then putting on the orthnormalization, 2 * (max of
the two axes units) is put to 1 cm instead of doing 2 units = 1cm. This
roughly keeps the configuration of the window.
The resolution() method is useful to get a horizontal step equivalent to
the width of a pixel. A higher sampling ratio (or resolution) had been
introduced in the following commit.
[apps] In curve view, avoid white vertical lines in integral curves due to pixel rounding