mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
[PQ] Rounding to int as discussed here https://discordapp.com/channels/539048679160676382/623947987822837779/642145431794745344
This commit is contained in:
committed by
Mat Sutcliffe
parent
de7174ad49
commit
ae5ede5667
@@ -342,8 +342,8 @@ namespace BlackMisc
|
||||
int CPhysicalQuantity<MU, PQ>::valueInteger(MU unit) const
|
||||
{
|
||||
Q_ASSERT_X(!unit.isNull(), Q_FUNC_INFO, "Cannot convert to null");
|
||||
const double v = unit.roundValue(this->value(unit), 0);
|
||||
return static_cast<int>(v);
|
||||
const double v = this->value(unit);
|
||||
return qRound(v);
|
||||
}
|
||||
|
||||
template<class MU, class PQ>
|
||||
|
||||
Reference in New Issue
Block a user