MCPcopy Create free account
hub / github.com/LASzip/LASzip / stoddefault

Function stoddefault

src/mydefs.cpp:758–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756}
757
758double stoddefault(const std::string& val, double def) {
759 try {
760 return std::stod(val);
761 } catch (const std::exception&) {
762 return def;
763 }
764}
765
766double DoubleRound(double value, int decimals) {
767 double scale = pow(10.0, decimals); // e.g. 10^10 for 10 decimal places

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected