Fix parser temperature rounding

This commit is contained in:
Scott Lahteine 2021-05-02 15:55:20 -05:00
parent 64a7dfbe7d
commit 5f594ce5d3

View File

@ -371,7 +371,7 @@ public:
case TEMPUNIT_K: f -= 273.15f;
case TEMPUNIT_F: f = (f - 32) * 0.5555555556f;
}
return LROUND(f + 0.5f);
return LROUND(f);
}
static inline celsius_t value_celsius_diff() {
@ -382,7 +382,7 @@ public:
case TEMPUNIT_K: break;
case TEMPUNIT_F: f *= 0.5555555556f;
}
return LROUND(f + 0.5f);
return LROUND(f);
}
#else // !TEMPERATURE_UNITS_SUPPORT