If the precision is lower than even the number after rounding, print 0.0

This commit is contained in:
baldurk
2017-08-29 13:19:49 +01:00
parent c8a160877f
commit cbbc779056
+6
View File
@@ -533,6 +533,12 @@ void PrintFloat(double argd, FormatterParams &formatter, bool e, bool f, bool g,
expon++;
}
}
else if(removedigs > ndigits)
{
ndigits = 1;
digits[0] = '0';
expon = 0;
}
else
{
// remove the specified number of digits