MCPcopy Create free account
hub / github.com/Niko1221/Strata / field_float

Function field_float

engine/src/split/tools/sfnx.cpp:213–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213float field_float(const std::string& cmd, const std::string& key, const std::string& v) {
214 double x = 0;
215 if (!fnx::parse_number(v.c_str(), x) || !std::isfinite((float) x)) throw std::runtime_error(cmd + ": " + key + "=" + v + " is not a number");
216 return (float) x;
217}
218
219uint64_t field_hex64(const std::string& cmd, const std::string& key, const std::string& v) {
220 if (v.empty() || v.size() > 16 || v.find_first_not_of("0123456789abcdefABCDEF") != std::string::npos)

Callers 1

parse_genFunction · 0.85

Calls 1

parse_numberFunction · 0.50

Tested by

no test coverage detected