* Convert Rational::Negate to an operator override
* Convert Rational::Add to + and += operator overrides.
* Convert Rational::Sub to - and -= operator overrides.
* Convert Rational::Div and ::Mul to use /, /=, *, *= operator overrides.
* Convert Rational::Mod to use %= and % operator overrides
* Convert Rational::Rsh and ::Lsh to use >>=, >>, <<=, << operator overrides
* Convert Rational::And, ::Or, ::Xor to use &=, &, |=, |, ^=, ^ operator overrides
* Convert Rational relational functions to operator overrides
* Remove unnecessary precision arguments from Rational class and remove use of explicit Rational constructors in favor of implicit conversions for value types
* Remove unnecessary precision variable from RationalMath operations
* Replace unnecessary Rational::Not with Xor operation
* Remove unnecessary Rational::IsZero() in favor of == 0 comparisons
* Fix rounding issues in ratpak that result from using large precisions.
* Move assignment stmt out of IsCurrentTooBigForTrig
- Separates values from the representation (base/radix) of those values.
- Uses a single base for all values represented as Rationals.
- Rationals are converted to/from a specific base when they are converted to/from strings.
This change moves the RADIX_TYPE enum into its own header. This resolves a compilation error and reduces the dependency graph by allowing RadixToStringConverter to include just the enum header rather than the entire CalcEngine header.
Change verified by ensuring Calculator build locally.
* Converts NumObj* functions to use Rationals. Places new functions under CalcEngine::RationalMath namespace
* Moves functions that correspond to an operator to the Rational class with intent to convert to operators in the future
* Consolidates use of RatPack's NUMBER and RAT data types to Number/Rational classes and RationalMath namespace.
Before this change, the pchs for CalcViewModel and Calculator project referenced project headers. If those project headers (or any of their dependencies) were to change, then the pch would be recompiled, slowing local build times.
By removing references to project headers, the pch will be compiled once and is resilient to changes in the project. Now that project headers are explicit about their dependencies, when there is a change to a project header only the translation units referencing the modified header will need to be rebuilt.
- Manually tested by ensuring Calculator project builds locally.
@Microsoft/calculator-team
Calculator (the main app project) depends on CalcManager, but only transitively: Calculator -> CalcViewModel -> CalcManager.
However, Calculator's project file currently has a direct dependency on CalcManager. Let's remove this to make it harder to accidentally introduce new dependencies between the layers.
Also cleaning up some commented-out directives in the CalcManager MSBuild file.
A few small changes to improve the view of the code in Solution Explorer:
* Delete folders from solution explorer which don't appear on disk (Resource Files, PerfTrack)
* Delete files on disk which aren't compiled into the project (Type.xaml)
* Rename CalculatorHistory.Cpp to CalculatorHistory.cpp, for consistency with other files