Skip to content

Commit

Permalink
Merge pull request #33 from navcoin/master
Browse files Browse the repository at this point in the history
merging master into 4.7.0
  • Loading branch information
proletesseract committed Jul 21, 2019
2 parents 4df887f + 4337157 commit 66ac0f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/qt/navcoinunits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,20 @@ QString NavCoinUnits::format(int unit, const CAmount& nIn, bool fPlus, Separator
qint64 coin = factor(unit);
int num_decimals = decimals(unit);
qint64 n_abs = (n > 0 ? n : -n);
double quotient;
double quotient = 0;
double quotientD = 0;
qint64 remainder;

quotient = n_abs / coin;
// Check if we have a coin
if (coin > 0)
{
quotient = n_abs / coin;
quotientD = (double) n_abs / (double) coin;
}

std::ostringstream out;
out << std::setprecision(num_decimals) << std::fixed
<< std::showpoint << (double)n_abs / (double)coin;
<< std::showpoint << quotientD;
std::istringstream in(out.str());
std::string wholePart;
std::getline(in, wholePart, '.');
Expand Down
1 change: 1 addition & 0 deletions src/qt/res/icons/Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/qt/res/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 66ac0f4

Please sign in to comment.