MCPcopy Create free account
hub / github.com/Tracktion/choc / doubleToString

Function doubleToString

choc/text/choc_JSON.h:180–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180inline std::string doubleToString (double value)
181{
182 if (std::isfinite (value)) return choc::text::floatToString (value, -1, true);
183 if (std::isnan (value)) return "\"NaN\"";
184
185 return value >= 0 ? "\"Infinity\""
186 : "\"-Infinity\"";
187}
188
189//==============================================================================
190template <typename Stream>

Callers 2

dumpMethod · 0.85
testJSONFunction · 0.85

Calls 1

floatToStringFunction · 0.85

Tested by 1

testJSONFunction · 0.68