libfixmath icon indicating copy to clipboard operation
libfixmath copied to clipboard

fix16_to_str - remove trailing zeros

Open AshUK opened this issue 3 years ago • 0 comments

Feature request:

When generating a string output. The string contains trailing zeros when rounding is enabled.

For e.g. when the a float value of 70.1F (Which is stored as 70.0999984741211) it has the the string output of 70.100.

Call order: fixed_value = fix16_from_float(float_value) fix16_to_str(output_string, fixed_value)

Would be useful if there was an option/parameter to remove the trailing zeros when generating the string.

AshUK avatar Mar 29 '21 16:03 AshUK