15 stringstream stream(str);
20 throw std::invalid_argument(
string(
"stringToFloat: Could not convert ") + str + string(
" to float."));
31 stringstream stream(str);
36 throw std::invalid_argument(
string(
"stringToDouble: Could not convert ") + str + string(
" to double."));
42 bool equals(
const float x,
const float y,
float epsilon) {
43 return abs(x - y) < epsilon;
47 bool equals(
const double x,
const double y,
double epsilon) {
48 return abs(x - y) < epsilon;
float stringToFloat(const string &str)
bool equals(const float x, const float y, float epsilon)
double stringToDouble(const string &str)