1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-26 18:01:35 +01:00

Tests for Printing Floating Point numbers

This commit is contained in:
jsalling
2016-11-14 23:10:18 -06:00
parent 47f6a85b8c
commit 9f4b1a332f
2 changed files with 85 additions and 14 deletions

View File

@@ -297,7 +297,7 @@ void UnityPrintFloat(_UD number)
/* Double precision calculation gives best performance for six rounded decimal places */
ROUND_TIES_TO_EVEN(fraction_part, (number - integer_part)*1000000.0);
if (fraction_part == 1000000)
if (fraction_part == 1000000) /* Carry across the decimal point */
{
fraction_part = 0;
integer_part += 1;