MCPcopy Create free account
hub / github.com/axmolengine/axmol / PointFromString

Function PointFromString

core/base/NS.cpp:151–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151Vec2 PointFromString(std::string_view str)
152{
153 Vec2 ret;
154
155 do
156 {
157 strArray strs;
158 AX_BREAK_IF(!splitWithForm(str, strs));
159
160 float x = (float)utils::atof(strs[0].c_str());
161 float y = (float)utils::atof(strs[1].c_str());
162
163 ret.set(x, y);
164 } while (0);
165
166 return ret;
167}
168
169Vec2 SizeFromString(std::string_view pszContent)
170{

Calls 4

splitWithFormFunction · 0.85
atofFunction · 0.85
c_strMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected