* Revert "[github/workflows] Update Metrics to remove NumWorksBot"
This reverts commit 110f333122.
* Added a color menu in graph and list
* Fixed color select display issue and build issue
* Changed color_cell to a circle
* Revert "Changed color_cell to a circle"
This reverts commit 28dddb42af.
* Color_cell with mask
* Fixed build issue
* Color selection : Added right handle and color name display in menu
* Fixed constexpr static colorMask
* Changed font in color_parameter_controller
* Fix building without debug
* Re-Fix building without debug
* Update colors
Co-authored-by: Hugo Saint-Vignes <hugo.saint-vignes@numworks.com>
Co-authored-by: Joachim LF <joachimlf@pm.me>
The method isOrthonormal takes into account the "offscreen" portion of
the Y axis. This fixes a bug where zooming when using the Navigate
option would remove the orthonormality marker while the graph was still
orthonormal.
The old method isOrthonormal has been split into two :
- shouldBeNormalized tests whether the range is close enough to a
normal range
- isOrthonormal tests whether the range is strictly orthonormal, but
takes into account imprecisions of floating-point arithmetic
The loss of significance that occurs when subtracting the bounds of the
axes must be taken into account when asserting whether the range is
orthonormal.
Zooming in and out on a graph usually preserves orthonormality. However,
if the window has its bounds close to the limits for the values on the
axes, zooming can change the ratio.
Evaluating a function containing a sequence, an integral or a
derivative, is time consuming. Computing a range requires a plethora of
evaluations, as such ranges for these functions cannot be evaluated in a
timely fashion.
Change-Id: I088a0e896dbc26e6563291cafdfe9ceba36dd5d0
When building an orthonormal range for the automatic zoom, we provide a
ratio for the screen without the margins. This way, adding the margins
will make the graph orthonormal, and the banner cannot cover the
function.
Change-Id: If3a3f799d4e7e3e81ab77c6b418d70b734a6fbca
When computing the automatic zoom, if the X axis has integer bounds
(most likely because the range has been built to be orthonormal), do not
add margins to the X axis, so that it keeps user friendly values.
Change-Id: I49d99b79c68fbd8a49e5c2521b250c40aad75d48
When a function that had previously been cached is deactivated, its
cache can be used by another function. When the function is reactivated,
if it tries to reuse its previous cache, it will be filled with values
from another function, and will not be cleared. By detaching the cache
of a function that becomes inactive, we ensure that the next time this
function is cached, the chache will be cleared.
e.g. Define to functions f(x)=x, g(x)=-x, draw them both.
Deactivate f, the redraw the graph
Reactivate f, the draw again
When three functions or more, the third function and later don't use
caching. But it is still possible for them to have been linked to a
cache (for instance if previous functions had been deactivated earlier).
To avoid a function tapping into another function's cache, we reset the
cache.
e.g. Define 3 functions f(x)=1, g(x)=2, h(x)=3, and deactivate f.
Draw the graph, come back, reactivate f, then draw again.
---> The space between y=2 and y=3 will be filled with the color of h,
as h "remembers" using cache n°2, wich currently contains the values of
function g.
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 cursor now initially aligns with the grid, and tries to avoid points
where the function is not defined.
Change-Id: Ie3b304281f5848102c2f3c0aa5c031b351418186
When entering the Navigate menu, a portion of the Y axis is memoized to
preserve the grid units.
However, this portion was not modified when zooming, causing some
glitches.
Change-Id: I06b4ee044eaa75d48b8f338c9ef6ea33bb299e39
If the user opens the Navigate menu, then closes it immediately, the
Auto status is not turned off.
Change-Id: I2d1ca0cfdae1b9c957dede7bf9f3c2890dea1bb0
When using the Navigate menu on graphs, the grid units are computed
using the normal graph's range, so that the units won't change.
Change-Id: I8ff8853868e5c90319619a6271d6a7d87ae82ab0
Scenario: (with the current auto zoom algorithm)
Graph f(x) = x! -> Auto axes are x=[-13,17647;13,17647],
y=[3628793;2628807]
Press "0" "EXE" to go to x = 0 -> Axes are x=[-13,17647;13,17647],
y=[-0.8612717;13.13873]
Press auto
Press "0" "EXE" to go to x = 0 -> the assertion about KDCoordinates
breaks.