MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / ToFloat

Method ToFloat

opt_utils/src/json.cpp:238–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236 }
237 }
238 float Value::ToFloat() const
239 {
240 if (IsNumber())
241 {
242 std::stringstream sstr(valueStr);
243 float val;
244 sstr >> val;
245 return val;
246 }
247 else
248 {
249 return 0.f;
250 }
251 }
252 double Value::ToDouble() const
253 {
254 if (IsNumber())

Callers

nothing calls this directly

Calls 1

IsNumberFunction · 0.85

Tested by

no test coverage detected