Fix precision of NumberExpression when writing to a string (reverts a3af2902ef)
See also: https://forum.freecadweb.org/viewtopic.php?f=3&t=34392
This commit is contained in:
@@ -268,7 +268,7 @@ void NumberExpression::negate()
|
||||
std::string NumberExpression::toString() const
|
||||
{
|
||||
std::stringstream s;
|
||||
s << std::setprecision(std::numeric_limits<double>::digits10 + 2) << quantity.getValue();
|
||||
s << std::setprecision(std::numeric_limits<double>::digits10 + 1) << quantity.getValue();
|
||||
|
||||
/* Trim of any extra spaces */
|
||||
//while (s.size() > 0 && s[s.size() - 1] == ' ')
|
||||
|
||||
Reference in New Issue
Block a user