! Read float from a string. */
| 58 | |
| 59 | /*! Read float from a string. */ |
| 60 | static inline float getFloat(const char*& token) { |
| 61 | token += strspn(token, " \t"); |
| 62 | float n = (float)atof(token); |
| 63 | token += strcspn(token, " \t\r"); |
| 64 | return n; |
| 65 | } |
| 66 | |
| 67 | /*! Read int from a string. */ |
| 68 | static inline int getInt(const char*& token) { |