* renamed MockGraphingImpl to GraphingImpl, updated the nuget.config to include the WindowsApps feed
* Revert nuget.config change
* Updated vcxproj files to output to the same directory regardless of configuration
* Removed outder used GenerateProjectSpecificOutputfolder instead
* revert commenting out the temporary.pfx cert in the calculator.vcxproj file
* Added IGraphAnalyzer
* Key Graph Features called and getting returned to the client. To do put all strings into the Equation object
* Updated UpdateKeyGraphFeatures to add function analysis data to all properties in Equation object
* Update KGF when variables are updated
* Key graph features ui started
* Added MathRichEditBox and started hooking up key graph features to the UI
* Updated EquationViewModel to include parity and periodicity
* Updated key graph features to update the EquationViewModel
* updated key graph features to display more values
* Key graph features populating uing MathRichEdit mode
* moved KeyGraphFeatures control to GraphingCalculator.xaml
* Use MathML formatting instead of MathRichEdit for strings passed back from the engine
* cleaned up project targeting and equation.h comments
* Updated equation edit box to populate for KeyGraphFeatures
* Fixed vcxproj files to have the correct targeting and certificates. KGF Title strings moved to x:Uid instead of the code behind
* Updated per PR feedback
* Update MathRichEditBox to detect if the string is a mathml string and use the appropriate set method to set the text
* fixed the issue where parity, periodicity and monotonicity could be set with an old value if the next one is empty
* KGF control UI adjustments and error handling
* Error control updates
* Error handling added when analysis fails
* fixed alignment on rich edit boxes
* Add monotonicity direction into the mathml string and only have 1 richeditbox
* Set hover state on KGF EquationEditBox to change button opacity and fixed spacing in Monotonicity RichEditBox
* remove sideload package certificate info VS added
* updated logic for setting error strings to be in the viewmodel
* Updated KeyGraphFeatures to populate dynamically using a ListView and TemplateSelector
* Update periodicity to not show if it isn't supported
* Fixed issue where y-intercept was using the x-intercept value
* Remove ItemsControl ItemsContainerStyle
* Updated per pr feedback. Fixed bug where analysis error would not reset
* Update MathRichEdit box to remove selection when focus is lost
* Updated mathrichedit to get LAF access for Dev, Release and Graphing projects
* Remove OnLostFocus in MathRichEdit, Change KGF ItemsControl back to ListView
* Clean up styles for KGF and ensure the match the comps
* Moved formatoptions logic to the Grapher constructor and reverted LineColor.Text resource that was mistakenly taken out
* Add copyright header to KGF Files
* fixed issue where asymptote values were not populating
* Disable KGF button when there is no equation. Fixed issue where equation populated in a new equationtextbox after the previous one was deleted
* Removed formatoptions testing lines used for debugging
* Replacing CalculatorVector usage with std::vector
Assumptions made here are that memory allocations
are not recoverable. If it can be proved that an index
will be in range, then the indexing operation is used.
If not (without manual checks) the std::vector::at function
is used to throw an exception in case of a programmer bug.
* Changes based on PR feedback
Using auto& in CalculatorCollector::UpdateHistoryExpression
so the token.first value is properly updated.
Using range for loop to GenerateExpressions.
Setting isEditable directly to the result of boolean expression.
Using token.second directly instead of creating a
separate tokenCommandIndex variable.
* Fixing issue with generating expressions strings.
A space should not be added before the first item.
### Description of the changes:
**1) Do not set units to default values if they already have valid values**
This fixes the actual issue. `UnitConverter::InitializeSelectedUnits()` ( this function resets all units to their default units if available for the current category ) gets called after `UnitConverterViewModel::RestoreUserPreferences()` ( this function restores user preferences ).
So Calculator has been restoring saved values, and then overriding the restored values with default values.
I modified `InitializeSelectedUnits()` so that we only initialize units only when they are not already set to valid units for the current category.
**2) Removed `m_isFirstTime`**
I noticed that we are calling `RestoreUserPreferences()` twice when Calculator starts up, and the function is restoring the same value both times
The below happens when Calculator starts up
1) On startup, in `UnitConverterViewModel::InitializeView()`, `RestoreUserPreferences()` is called.
2) `RestoreUserPreferences()` in turn triggers `OnUnitChanged()`
3) During the first call to `OnUnitChanged()`, m_IsFirstTime is `True`, so we call `RestoreUserPreferences()` again while also setting `m_IsFirstTime` to `False`.
4) `RestoreUserPreference()` again triggers `OnUnitChanged()`
5) During the second call to `OnUnitChanged()`, m_IsFirstTime is `False`, so we call `SaveUserPreferences()`
I think we should only call `SaveUserPreferences()` inside `OnUnitChanged()` since we already restored user preferences during view initialization. I can't really think of a reason to restore units after view has been initialized. This led me to just delete `m_isFirstTime`.
### How changes were validated:
Manually tested that units and the current category are properly selected when you quit and start Calculator.


## Fixes#445.
* precisely calculates the number of digits of the source and compute the number of significant digits of the result based on that.
* fix unit test
* Fix warning C4267
* Optimize how we calculate the number of digits in the integer part and don't trim the value when used by the currency converter
* modify GetNumberSignificantDigits
* fix CI error
* Access to wstring::npos from static calls
* Move UnitConverter static methods related to number to NumberFormattingUtils
* rename namespace
* Add comment and fix typo
* Move standard headers
Having an extra integer variable to hold onto an i or i-1 value is inefficient, for "if (m_token.at(i) != chZero)", the code under "fDigitsFound" will always run, so it makes sense to put the fDigitsFound code under the if statement, which can return from the function entirely instead of breaking.
### How changes were validated:
- Manual Testing verified the code having identical behavior as before, with no side effects.
`mulnum` et al. are declared `extern` in `ratpak.h`, which conflicts
with the `__inline` used with them. Additionally, most similar functions
don't have such keyword applied to them.
This is extract from #211 that enables compilation with GCC. With #211
now in the state of bitrot, I would rather try approaching it in smaller
steps that can be hopefully merged quicker, even if it does not provide
full support for all the features #211 provided.
This will _compile_ correctly with my (@janisozaur) GCC, but clang is
more picky about flexible array members and refuses to compile it yet.
I will extract remaining parts of #211 in future PRs.
I marked @fwcd as author, as he did most of the work in #211.
Description of the changes:
Adjusted some of the values in .clang-format
Add clang-format-all.ps1
Fix path to .clang-format in Calculator.sln
How changes were validated:
Manual.