X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/066e5e3fd23dea9fd69835b506c8d68855f867ff..a516284f67e1910fc6dc5364b289340332d0d35f:/include/wx/string.h?ds=sidebyside diff --git a/include/wx/string.h b/include/wx/string.h index f51d3f0660..c7f380b5ec 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -2326,12 +2326,12 @@ public: // convert to a double bool ToCDouble(double *val) const; - // create a string representing the given floating point number + // create a string representing the given floating point number with the + // default (like %g) or fixed (if precision >=0) precision // in the current locale - static wxString FromDouble(double val) - { return wxString::Format(wxS("%g"), val); } + static wxString FromDouble(double val, int precision = -1); // in C locale - static wxString FromCDouble(double val); + static wxString FromCDouble(double val, int precision = -1); #ifndef wxNEEDS_WXSTRING_PRINTF_MIXIN // formatted input/output