force floats to fixed width, no scientific notation in output

This commit is contained in:
suhrke 2017-07-12 20:09:36 -07:00
parent 32e6e092c2
commit 1835dccf8b
2 changed files with 3 additions and 3 deletions

View File

@ -739,7 +739,7 @@ EntityConverter::offset(const std::string &value, const float amount) const
c += amount; c += amount;
std::stringstream ss; std::stringstream ss;
ss << std::fixed << std::setprecision(OUTPUT_PRECISION) << c; ss << std::fixed << std::fixed << std::setprecision(OUTPUT_PRECISION) << c;
return ss.str(); return ss.str();
} }
@ -754,7 +754,7 @@ EntityConverter::adjustAngleForHandedness(const std::string &angle) const
a = -a + 90.0; a = -a + 90.0;
std::stringstream ss; std::stringstream ss;
ss << std::fixed << std::setprecision(OUTPUT_PRECISION) << a; ss << std::fixed << std::fixed << std::setprecision(OUTPUT_PRECISION) << a;
return ss.str(); return ss.str();
} }

View File

@ -56,7 +56,7 @@ std::string texdef_net(const TPlanePoints &b) {
v3 = -b.vshift / -REFLEX_TEXRES_PLACEHOLDER; // HEIGHT v3 = -b.vshift / -REFLEX_TEXRES_PLACEHOLDER; // HEIGHT
std::stringstream ss; std::stringstream ss;
ss << std::setprecision(MAX_PRECISION) ss << std::fixed << std::setprecision(MAX_PRECISION)
<< "( " << h1 << ' ' << h2 << ' ' << h3 << " ) " << "( " << h1 << ' ' << h2 << ' ' << h3 << " ) "
<< "( " << v1 << ' ' << v2 << ' ' << v3 << " )"; << "( " << v1 << ' ' << v2 << ' ' << v3 << " )";
return ss.str(); return ss.str();