Skip to content

Commit

Permalink
Try std::llround()
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Oct 11, 2024
1 parent e172d76 commit f5945c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cli/abstractcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QLocale>
#include <QTimer>

#include <cmath>
#include <ratio>

/*!
Expand Down Expand Up @@ -219,7 +220,8 @@ quint32 AbstractCommand::parseNumber(const QString &value, const QString &unit,
}
qDebug() << "G" << dbl << ratio.isValid() << ratio.num << '/' << ratio.den << (quint32)DOKIT_RESULT(dbl);
qDebug() << "I" << dbl << '*' << ratio.num << '*' << R::den << '/' << ratio.den << '/' << ratio.num
<< qSetRealNumberPrecision(10) << '=' << DOKIT_RESULT(dbl) << (quint32)DOKIT_RESULT(dbl);
<< qSetRealNumberPrecision(10) << '=' << DOKIT_RESULT(dbl) << '=' << (quint32)DOKIT_RESULT(dbl)
<< '=' << std::llround(DOKIT_RESULT(dbl));
return (quint32)DOKIT_RESULT(dbl);
}
#undef DOKIT_RESULT
Expand Down

0 comments on commit f5945c1

Please sign in to comment.