diff --git a/utilities.hpp b/utilities.hpp index c0fee9a..6e752ff 100755 --- a/utilities.hpp +++ b/utilities.hpp @@ -142,6 +142,15 @@ struct Vector6d : public std::array { }; namespace Utilities { +template +std::string to_string_with_precision(const T a_value, const int n = 2) +{ + std::ostringstream out; + out.precision(n); + out << std::fixed << a_value; + return out.str(); +} + inline bool compareNat(const std::string &a, const std::string &b) { if (a.empty()) @@ -440,15 +449,6 @@ template std::string toString(const T &v) { std::to_string(v[2]) + ")"; } -template -std::string to_string_with_precision(const T a_value, const int n = 2) -{ - std::ostringstream out; - out.precision(n); - out << std::fixed << a_value; - return out.str(); -} - template size_t computeHashUnordered(const std::vector &v) {