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

Function parseFloat

core/3d/ObjLoader.cpp:260–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258 return false;
259}
260static inline float parseFloat(const char*& token)
261{
262 token += strspn(token, " \t");
263#ifdef TINY_OBJ_LOADER_OLD_FLOAT_PARSER
264 float f = (float)utils::atof(token);
265 token += strcspn(token, " \t\r");
266#else
267 const char* end = token + strcspn(token, " \t\r");
268 double val = 0.0;
269 tryParseDouble(token, end, &val);
270 float f = static_cast<float>(val);
271 token = end;
272#endif
273 return f;
274}
275
276static inline void parseFloat2(float& x, float& y, const char*& token)
277{

Callers 3

parseFloat2Function · 0.85
parseFloat3Function · 0.85
LoadMtlFunction · 0.85

Calls 2

atofFunction · 0.85
tryParseDoubleFunction · 0.85

Tested by

no test coverage detected