Added a default argument to CurveView::drawCurve : a function to initiate the
memoization of continuous functions. The function is implemented in
ContinuousFunctionCache and provided by GraphView. This should be invisible
to other types of curves that rely on CurveView::drawCurve.
Change-Id: I59aa55d67154b6d4bf9614b7ed87c48408773d86
When evaluating a ContinuousFunction for a float value, the function
will first try to ask its cache (if it has been filled beforehand).
Change-Id: I519d2d3dcf344ba63e30a0f011db2306c7141315
ContinuousFunction now has an attribute of type ContinuousFunctionCache,
implementing methods to store and retrieve 320 float values, in order to
speed up function display in Graph.
Change-Id: I6f7ccdf3ae3c6dd8b08b93d786c8d0be7aa4dee8
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
It appeared that without the packed keyword, the compiler did not handle
access to unaligned record data members, which leads to crashes on the
device.
Change-Id: I401f075e7f62458a4733baa8d81983d4be34b730
We now compute the value of the mantissa in double (instead of float)
to limit conversion error occuring for big numbers.
Change-Id: Ia61c052f0bc4a9196c53e2c7900eb48e3343d39c
New way of drawing sigma sign. Only a single branch is stored. The full
symbol is created by mirroring half a symbol.
Change-Id: I0fc32393203e51578c88b01125a907d402291534
Changed the look of the integral symbol and the positions of the upper
and lower bounds. Added a drawing of the window to explain the meaning
of various margins.
Change-Id: I3ffc07848dc9ad68dce3c0e01853d548e31dd152
Parenthesis collapsing is no longer handled by LeftParenthesisLayout and
RightParenthesisLayout, but by ParenthesisLayout itself.
Change-Id: I6797cd40ee02881544e01e9b88f31a597c51d179
Fraction are now only collapsed if they are the first thing to be
collapsed or if a parenthesis is open.
Change-Id: Ie7f3a99498b9981dff70221efd7de6bee6d0c379
When leaving the Calculation app, the layout currently being edited is
now stored in a buffer, to be restored when the app resumes.
Change-Id: I59c16e18f7193bdcbb36888b54cb2722897f85f5
Added some methods to manipulate the layout of a LayoutField from an
ExpressionField, like storing into and restoring from a buffer.
Change-Id: I7b7b5b53626f19237a5215bd196e897a518e9577
Created function Layout::LayoutFromAddress, which creates in the pool a layout
that has been stored in a buffer. Functionally identical to
Expression::ExpressionFromAddress.
Change-Id: I204e6b7d42f259ef2732563aa2a168a644060867
The cacheBuffer from EditExpressionController has been moved in the
snapshot, to act as a zone where layout information can be kept while
the app is inactive.
Change-Id: If9206abf77f37d6b984826e5f09658848381a75f
Changed TextFieldFunctionTitleCell::reloadCell to solve an issue with
the alignment of a function's name and definition when changing the
expression :
- typing u_n = (1/3)/2 then changing to u_n = 1/(2/3) without erasing
the formula first. u_n would no longer be aligned with the = sign.
Change-Id: Ib58e4220dc67c77639272c7ea784418bddffb432
SequenceTitleCell::reloadCell now triggers a layoutSubviews, causing the
vertical alignment to be recomputed. This solves issues regarding the
alignment of a sequence's name and definition, such as :
- typing u_n = v_n ; v_n would be displayed above u_n
- typing u_n = (1/3)/2 then changing to u_n = 1/(2/3) without erasing
the formula first. u_n would no longer be aligned with the = sign.
Change-Id: I4a771d96ea79e42e2f4822e93f9f1cbbcf867610
LayoutField does no redraw its content on every occasion anymore. This
allows the input window in Calculation to not scroll to the beginning
when writing an overly long formula.
Change-Id: I14276828884035463b0a6438bfca4dd76c7f5057
New tests compute derivatives while replacing symbols with their definitions or undefined, as the device does.
Change-Id: I99179bf6540182ff929938fb96a00a1ed2fbcf49