1. Information about a unit's dimension now uses inheritance.
_m is an instance of DistanceAlias, which is derived from Alias.
A UnitNode now keeps a pointer to an Alias and one to a Prefix.
All aliases are still defined as constexpr.
This cleans up a lot of the code used namely for computing the
additional outputs in Calculation.
2. Instead of being defined with a string, each unit is described by its
ratio with the base SI unit (ex: _L is 0.001 instead of "0.001_m^3").
This greatly speeds up the calculations using units, as the algorithm
to find the best unit used to parse the definition.
Change-Id: I4d6ed6ad4cb967026a3f01a335aec270066e2b9f
The symbol for pint (_pt) conflicts with the symbol for pico-tonne. To
solve that, prefixes for tonnes are now restricted to the positive
prefixes : k, M, G, T.
Change-Id: Ie968374bbb5e0ebd2c0f08e4b1bdc1708eb6a041
Instead of relying on the order in which the apps are passed at compile
time, the look of the Home app is defined in a config file, and depends
on the country chosen.
Change-Id: If7f56a284e0001d6d75ece1e7efdf5fd1d0a9978
The additional results on units now include conversions into both unit
systems (metric and imperial).
Change-Id: Ie0f12eb3735e775560b66c2cbd78bc9a659145bb
Added methods to return the standard format for each dimension,
depending on the chosen unit system.
Change-Id: I3591a806beca315674cc09093b57e8753db5db6a
A split (such as _h+_min+_s) can now be generated for distances, volumes
and masses using imperial units.
Change-Id: Ib3ad63614979eddd02fbe0e99f16cf09dcf7c1fc
BuildTimesplit (used to create expressions of the form h+min+s) is now
based on the more general BuildSplit.
Change-Id: I3e55359cc6b9735269140942b29bd1d364fc35e7
When the country is USA, the units will be simplified to common imperial
units rather than metric.
Change-Id: Ia533527a429ac26526380e324b9543b359f3b400
Classes LanguageController and CountryController have been fused into
one class LocalizationController, as they were very similar. This allows
the Settings and OnBoarding apps to only keep one controller for both
functions.
Change-Id: Ic23f300c37122249d34caaf18a633b5815240a78
Instead of being hardcoded in the python script, preferences specific to
each country are defined in the country_preferences.h and .csv files.
Change-Id: I71e276341e1586935b4d5814be5b1be80fa170a0
Each country comes with an set of preferences, built at compile time by
apps/i18n.py, used to define :
- the exam mode
- the method for computing quartiles
- the unit system in which to output the results with units
Functions to access those preferences are available in
via sharedGlobalPreferences.
Change-Id: I220ebaa9b9e8954dfe33cd51936f47505b98978d
The new units are :
distance mile, yard, foot, inch
mass pound, ounce
volume gallon, quart, pint, cup, fluid ounce
table spoon, tea spoon
Change-Id: I6864067a1822a077764ed3b61fc46004732e9447
As some definitions now depend on the selected country, tests for the
statistics app now check that the right method is used for each country,
and that each method yields the correct results.
Change-Id: Ia5ad091136746f3284f7524376301fac0c582364
Implemented a new method for computing quartiles, used for all countries
except France and Italy. Quartiles are now computed as the medians of
the lower half and upper half of the dataset.
Change-Id: Idfb89a617799eca1d23326ebbcfbbea58e6236b8
The Dutch exam mode is now only accessible when the selected country is
Netherlands on an official firmware.
Change-Id: I6d70f79b6e728482d8c7d86ef6a2e5c53ee18a39
Added a list of supported countries to I18n, and created messages for
each country's names in each language.
Change-Id: I1b887d75da980d99e21f89cc151249e42c78de88
When opening the window for choosing the regression model, the row
corresponding to the currently selected model will be highlighted.
Change-Id: I65772186fc302c3706a5571f98ecff620e4a8ca9
Multiplication::privateShallowReduce can create an Undef node by
multiplying 0 and inf. In this case, we set the whole multiplication to
undef, to avoid things such as undef*π.
This fixes the following bug :
- In Graph, enter i*inf*π as one of the bounds. An assertion fails in
Multiplication::removeUnit.
Change-Id: Ie9d0d561d6e310f52220b98541f22a4b5e56762c
This fixes the following crash: when reloading the cell before
initializing the m_textFieldBuffer, TextField::ContentView::text() will
use the content of the uninitialized m_textFieldBuffer to compute the
minimalSizeForOptimalDisplay.
Changed previousNestedIntegral method to prevent integrals located in
integral bounds to be considered as nested.
Change-Id: Id8cc4369f53c278ac59039fde1c2818af2ccacab