MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / strToVal

Method strToVal

src/MathExp.cpp:150–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150float 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected