mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-16 02:02:51 -07:00
CalcEngine: Convert NumObj* functions to use Rationals and move under CalcEngine::RationalMath namespace (#12)
* 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.
This commit is contained in:
parent
3e093155b1
commit
995f077127
11 changed files with 1191 additions and 845 deletions
|
@ -293,9 +293,7 @@ wstring COpndCommand::GetString(uint32_t radix, int32_t precision, wchar_t decim
|
|||
|
||||
if (m_fInitialized)
|
||||
{
|
||||
PRAT valRat = m_value.ToPRAT();
|
||||
result = NumObjToString(valRat, radix, eNUMOBJ_FMT::FMT_FLOAT, precision);
|
||||
destroyrat(valRat);
|
||||
result = m_value.ToString(radix, eNUMOBJ_FMT::FMT_FLOAT, precision);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue