mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-20 21:33:10 -07:00
Fix DwWordBitWidthFromeNumWidth typo (#1898)
This commit is contained in:
parent
d9ef114dbe
commit
135c37d6f7
3 changed files with 5 additions and 5 deletions
|
@ -101,7 +101,7 @@ CCalcEngine::CCalcEngine(
|
||||||
{
|
{
|
||||||
InitChopNumbers();
|
InitChopNumbers();
|
||||||
|
|
||||||
m_dwWordBitWidth = DwWordBitWidthFromeNumWidth(m_numwidth);
|
m_dwWordBitWidth = DwWordBitWidthFromNumWidth(m_numwidth);
|
||||||
|
|
||||||
m_maxTrigonometricNum = RationalMath::Pow(10, 100);
|
m_maxTrigonometricNum = RationalMath::Pow(10, 100);
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ void CCalcEngine::SetRadixTypeAndNumWidth(RadixType radixtype, NUM_WIDTH numwidt
|
||||||
if (numwidth >= NUM_WIDTH::QWORD_WIDTH && numwidth <= NUM_WIDTH::BYTE_WIDTH)
|
if (numwidth >= NUM_WIDTH::QWORD_WIDTH && numwidth <= NUM_WIDTH::BYTE_WIDTH)
|
||||||
{
|
{
|
||||||
m_numwidth = numwidth;
|
m_numwidth = numwidth;
|
||||||
m_dwWordBitWidth = DwWordBitWidthFromeNumWidth(numwidth);
|
m_dwWordBitWidth = DwWordBitWidthFromNumWidth(numwidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
// inform ratpak that a change in base or precision has occurred
|
// inform ratpak that a change in base or precision has occurred
|
||||||
|
@ -50,7 +50,7 @@ void CCalcEngine::SetRadixTypeAndNumWidth(RadixType radixtype, NUM_WIDTH numwidt
|
||||||
DisplayNum();
|
DisplayNum();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CCalcEngine::DwWordBitWidthFromeNumWidth(NUM_WIDTH numwidth)
|
int32_t CCalcEngine::DwWordBitWidthFromNumWidth(NUM_WIDTH numwidth)
|
||||||
{
|
{
|
||||||
switch (numwidth)
|
switch (numwidth)
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,7 @@ uint32_t CCalcEngine::NRadixFromRadixType(RadixType radixtype)
|
||||||
// Toggles a given bit into the number representation. returns true if it changed it actually.
|
// Toggles a given bit into the number representation. returns true if it changed it actually.
|
||||||
bool CCalcEngine::TryToggleBit(CalcEngine::Rational& rat, uint32_t wbitno)
|
bool CCalcEngine::TryToggleBit(CalcEngine::Rational& rat, uint32_t wbitno)
|
||||||
{
|
{
|
||||||
uint32_t wmax = DwWordBitWidthFromeNumWidth(m_numwidth);
|
uint32_t wmax = DwWordBitWidthFromNumWidth(m_numwidth);
|
||||||
if (wbitno >= wmax)
|
if (wbitno >= wmax)
|
||||||
{
|
{
|
||||||
return false; // ignore error cant happen
|
return false; // ignore error cant happen
|
||||||
|
|
|
@ -179,7 +179,7 @@ private:
|
||||||
CalcEngine::Rational SciCalcFunctions(CalcEngine::Rational const& rat, uint32_t op);
|
CalcEngine::Rational SciCalcFunctions(CalcEngine::Rational const& rat, uint32_t op);
|
||||||
CalcEngine::Rational DoOperation(int operation, CalcEngine::Rational const& lhs, CalcEngine::Rational const& rhs);
|
CalcEngine::Rational DoOperation(int operation, CalcEngine::Rational const& lhs, CalcEngine::Rational const& rhs);
|
||||||
void SetRadixTypeAndNumWidth(RadixType radixtype, NUM_WIDTH numwidth);
|
void SetRadixTypeAndNumWidth(RadixType radixtype, NUM_WIDTH numwidth);
|
||||||
int32_t DwWordBitWidthFromeNumWidth(NUM_WIDTH numwidth);
|
int32_t DwWordBitWidthFromNumWidth(NUM_WIDTH numwidth);
|
||||||
uint32_t NRadixFromRadixType(RadixType radixtype);
|
uint32_t NRadixFromRadixType(RadixType radixtype);
|
||||||
double GenerateRandomNumber();
|
double GenerateRandomNumber();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue