Skip to content

Commit

Permalink
RS_Math: default QString precision=16
Browse files Browse the repository at this point in the history
The default tolerance=6 is low
  • Loading branch information
dxli committed Nov 16, 2024
1 parent 1f900c9 commit 380a22d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion librecad/src/lib/math/rs_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ double RS_Math::eval(const QString& expr, double def) {
double RS_Math::convert_unit(const QRegularExpressionMatch& match, const QString& name, double factor, double defval) {
if (!match.captured(name).isNull())
LC_ERR <<"name="<<name<<": "<< match.captured(name);
QString input = (!match.captured(name).isNull()) ? match.captured(name) : QString("%1").arg(defval);
QString input = (!match.captured(name).isNull()) ? match.captured(name) : QString::number(defval, 'g', 16);
return input.toDouble() * factor;
}

Expand Down

0 comments on commit 380a22d

Please sign in to comment.