This commit is contained in:
Branimir Karadžić
2017-06-17 17:02:46 -07:00
parent e88e8355ac
commit d73c9517f9
2 changed files with 11 additions and 0 deletions

View File

@@ -239,6 +239,9 @@ namespace bx
///
int32_t toString(char* _out, int32_t _max, uint64_t _value, uint32_t _base = 10);
///
bool fromString(float* _out, const char* _str);
///
bool fromString(double* _out, const char* _str);

View File

@@ -1042,6 +1042,14 @@ namespace bx
return hd.d;
}
bool fromString(float* _out, const char* _str)
{
double dbl;
bool result = fromString(&dbl, _str);
*_out = float(dbl);
return result;
}
bool fromString(double* _out, const char* _str)
{
PrepNumber pn;