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:
Josh Koon 2019-02-19 07:46:17 -08:00 committed by GitHub
parent 3e093155b1
commit 995f077127
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 1191 additions and 845 deletions

View file

@ -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;