mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-04 23:45:26 +00:00
Fix bug (#2114)
This commit is contained in:
parent
03ca87b13e
commit
e7359563c6
@ -159,6 +159,7 @@ std::string to_string_decimal(float decimal, int8_t precision) {
|
||||
double fractional_part;
|
||||
|
||||
std::string result;
|
||||
if (precision > 9) precision = 9; // we will convert to uin32_t, and that is the max it can hold.
|
||||
|
||||
fractional_part = modf(decimal, &integer_part) * pow(10, precision);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user