Commit Graph

1405 Commits

Author SHA1 Message Date
Léa Saviot
f98c171d2a [apps/variable_box] Prepare for Code::VariableBox factorization 2020-06-04 14:50:05 +02:00
Léa Saviot
0f02a61dc4 [apps/code] Use textLength in VarBoxController::insertTextInCaller 2020-06-04 14:50:03 +02:00
Léa Saviot
7f486d790f [apps/code] Get current script variables and functions 2020-06-04 14:50:03 +02:00
Émilie Feral
83a63155b1 [apps] PoincareHelpers: enable to specify the UnitConversion mode in
Simplify
2020-06-04 14:50:03 +02:00
Léa Saviot
068ed96d79 [apps/range_1D] Add comment abour k_minFloat 2020-06-04 14:50:00 +02:00
Joachim Le Fournis
899e0d4a6b [apps/shared] Fixed a small mistake in parameter_text_field_delegate.cpp
In this commit, there was a small oversight in 7a4ee746b2, which caused https://github.com/numworks/epsilon/issues/1570
2020-05-29 02:27:48 -07:00
Léa Saviot
a56a73b0ba [apps/calculation] Fix calculation height computation
It was done in two places before, which created inconsistencies
2020-05-28 04:44:27 -07:00
Léa Saviot
1d3a949b6f [apps/shared] Add escape case 2020-05-28 04:44:27 -07:00
Léa Saviot
5535145b51 [apps/calculation] Calculation on 2 lines if does not fit when expanded
Scenario: 1+1+1+1+1+1+1+10.5 fits on one line when not expanded, but
when the exact result is displayed not -> we thus always display it on
two lines
2020-05-28 04:44:27 -07:00
Léa Saviot
579485c8c0 [apps/calculation] CanBeSingleLine differs if args are view/layout sizes
If the sizes are for layouts, we need to add the margins added by the
views.
2020-05-28 04:44:27 -07:00
Léa Saviot
11c39b6206 [apps/calculation] Calculation::height has two types of margin arguments
One for the margin between layouts and on top / at the bottom of the
cell, the other for the margin surrounding each layout.
2020-05-28 04:44:27 -07:00
Léa Saviot
30c243e2e4 [apps/scrollable_multiple_expressions_view] Factorize baseline() 2020-05-28 04:44:27 -07:00
Joachim Le Fournis
67fc7502e2 [App/zoom_parameter_controller] Add comment
See : https://github.com/numworks/epsilon/pull/1548#discussion_r425708055
2020-05-22 00:42:05 -07:00
Joachim Le Fournis
f1209bcf76 [App/zoom_parameter_controller] Changed subview order
This fixes #500
2020-05-22 00:42:05 -07:00
Léa Saviot
e7988b9fa2 [apps/round_cursor_view] Add comment about flaw in algorithm 2020-05-15 02:52:54 -07:00
Léa Saviot
a0c5a1fe1c [apps] InteractCurveVwCtlr::addMargin adds more than the required margin 2020-05-15 02:52:54 -07:00
Léa Saviot
ee78948cf8 [apps/interactive_curve_view_range] Clean panToMakePointVisible 2020-05-15 02:52:54 -07:00
Léa Saviot
456cd3c73a Revert "[apps] Add FLT_EPSILON in float comparisons in interactive_curve_vw_rge"
This reverts commit 18381fd334.
2020-05-15 02:52:54 -07:00
Joachim Le Fournis
480459ab19 Changed setRecompute() to forceRecompute()
See https://github.com/numworks/epsilon/pull/1538#discussion_r419255425
2020-05-04 01:16:04 -07:00
Joachim Le Fournis
9e8229e767 [Interval] Removed useless getter
See https://github.com/numworks/epsilon/pull/1538#discussion_r419252679
2020-05-04 01:16:04 -07:00
Joachim LF
43bceac2c9 [Interval] Coding style on compute 2020-05-04 01:16:04 -07:00
Joachim LF
f250311856 [Interval] Patch the need recomputing 2020-05-04 01:16:04 -07:00
Émilie Feral
675a0d3f4c Add missing definition of static member variables 2020-04-15 10:34:00 -04:00
Romain Goyet
84768472bd Explicit std::min/max template usage
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
2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0 Use std::min and std::max 2020-04-14 09:31:02 -04:00
Léa Saviot
2ed354710f [build/simulator] NDEBUG flag in release mode
This way, asserts are not performed on simulator platforms
2020-04-10 00:49:15 -07:00
Neven Sajko
c92b770112 Performance fixes relating to floating point constants
This replaces unnecessary double-precision soft-float operations with
single-precision floating-point operations, mainly by casting.

In a couple places I also replace a function call with a constant.
2020-04-09 13:58:56 +02:00
Émilie Feral
068325d151 Coding style: remove unecessary 'virtual' keyword when 'override' is
present 2/2
2020-04-09 11:36:51 +02:00
Jean-Baptiste Boric
64d0b3107f [apps] Remove statically-allocated buffers 2020-04-08 10:09:47 +02:00
Émilie Feral
26aab94ac0 [apps/shared] Avoid signed/unsigned int comparison warning 2020-04-07 09:51:39 +02:00
Émilie Feral
e1d7b6bb04 [apps] Avoid unsigned/signed comparison: storeChecksumAtIndex takes an
int as parameter
2020-04-07 09:51:39 +02:00
Léa Saviot
19b5653851 [apps/i18n] Remove Language::Default
We never translate a i18n message to something else than the currrent
language selected
2020-04-06 13:35:18 +02:00
Romain Goyet
ada205b1a7 [build] Use variants
- Move helpers functions into build/helpers.mak
- Move official warning into official targets only
2020-04-03 22:26:55 -04:00
Émilie Feral
8d621e4dce [apps/shared] ScrollableMultipleExpressionsView: reload scroll content
view layout when changing the displayed expression layouts

Fix bug: input (transpose([1 1 1 1 1 1])[1 1 1 1 1 1])^30, click on 'OK'
and then 'up'. The cell is mis-displayed.
2020-04-03 10:42:42 +02:00
Émilie Feral
633776b92f [apps/shared] Fix CurveView::drawArrow on arrow without orientation 2020-04-01 11:46:25 +02:00
Émilie Feral
0f00bdda33 [apps] Fix test build 2020-04-01 10:18:09 +02:00
Émilie Feral
886fc98350 [escher] Palette: factorize data color iteration 2020-04-01 10:18:08 +02:00
Émilie Feral
d504564334 [apps/shared] Create ZoomAndPanCurveViewController,
ZoomParameterController inherits from ZoomAndPanCurveViewController
2020-04-01 10:18:08 +02:00
Émilie Feral
52b6508d6c [apps/shared] Create ZoomCurveViewController:
SimpleInteractiveCurveViewController inherits from
ZoomCurveViewController
2020-04-01 10:18:08 +02:00
Émilie Feral
9e822e85e5 [apps/shared] CurveView: implement drawArrow 2020-04-01 10:18:08 +02:00
Émilie Feral
aaf71328ba [apps/shared] CurveView: resolve name conflict -
drawHorizontalOrVerticalSegment & drawSegment -
2020-04-01 10:18:08 +02:00
Romain Goyet
a3b1b51f75 [pyton/matplotlib] Support plot 2020-04-01 10:18:08 +02:00
Léa Saviot
bd0b9f8a4a [apps/curve_view] Fix typo
The labels would not float on the right of the display
2020-03-31 15:16:39 +02:00
Léa Saviot
53705fb333 [apps/graph_ctrlr] Reload range if no previous model is present
We memoize the checksum of the x first models, and we check that one of
these models is still present when the graph view appears. If so, we do
not reload the range, other wise we reload it.

Scenario:
f(t) = [t^2  t+1] in parametric
Display the graph
f(x) = 1 on ]-inf;0]
g(x) = 2 on [0;inf[
Display the graph -> the range did not change
2020-03-11 11:43:36 +01:00
Léa Saviot
aab8974934 [apps] Memoize five model checksums 2020-03-11 11:43:36 +01:00
Romain Goyet
2bf83c43a8 [apps/shared] Factorize CurveView::label
There was a lot of code duplication.
I removed the initialization of xLabel{} and yLabels{} because those are
scratch buffers that shouldn't be accessed before being written to
anyway.
2020-03-11 09:51:33 +01:00
Ruben Dashyan
1ca902c129 [apps/shared/round_cursor_view] Comment about markRectAsDirty 2020-03-10 11:11:57 +01:00
Ruben Dashyan
8337e36f46 [apps/shared/*_cursor_view] CursorView inherits from TransparentView
so that CursorView tells its superview to redrawn in the background,
except the RoundCursorView.
2020-03-10 11:11:57 +01:00
Ruben Dashyan
afb1d18d65 [apps/shared/sum_graph_controller] Factor constexpr 2020-03-10 10:33:30 +01:00
Ruben Dashyan
f0ef84b3bc [apps/shared/sum_graph_controller] In LegendView::setSumLayout, factor Layout building 2020-03-10 10:33:30 +01:00