| 148 | } |
| 149 | |
| 150 | float MathExp::strToVal(std::string str) |
| 151 | { |
| 152 | if(str[0] == *"$") |
| 153 | return getVariable(str.substr(1, str.length() - 1)); //it's a variable! |
| 154 | |
| 155 | //it's a value! |
| 156 | std::stringstream stream; |
| 157 | stream << str; |
| 158 | |
| 159 | float value; |
| 160 | stream >> value; |
| 161 | |
| 162 | return value; |
| 163 | } |
nothing calls this directly
no outgoing calls
no test coverage detected