summaryrefslogtreecommitdiff
path: root/src/mbgl/util/dtoa.hpp
blob: 22aa925675808ec702d580b185d59a52c38c6959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <string>
#include <cstdlib>

namespace mbgl {
namespace util {

std::string dtoa(double value, bool decimal = false);

inline double stod(const std::string& str) {
    return ::strtod(str.c_str(), nullptr);
}

} // end namespace util
} // end namespace mbgl