uNumberToStr(double): added "fixed" param (default false) to fix ros param double/int conversion issue.

This commit is contained in:
matlabbe
2022-11-11 16:20:59 -08:00
parent 16e3314e64
commit 6d713c2ccb
3 changed files with 15 additions and 9 deletions
@@ -109,13 +109,13 @@ std::string UTILITE_EXP uNumber2Str(int number);
* @param number the number to convert in a string
* @return the string
*/
std::string UTILITE_EXP uNumber2Str(float number, int precision=6);
std::string UTILITE_EXP uNumber2Str(float number, int precision=6, bool fixed = false);
/**
* Convert a number (double) to a string.
* @param number the number to convert in a string
* @return the string
*/
std::string UTILITE_EXP uNumber2Str(double number, int precision=6);
std::string UTILITE_EXP uNumber2Str(double number, int precision=6, bool fixed = false);
/**
* Convert a string to an integer.