You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@lbartoletti the test passes on my machine even without the m factor.
I dind't really measure how much overhead this two lines are adding, but if we can avoid them let's do it. (use case: massive json generation where each and every coordinate goes through this function)
C++ tests are OK (except a floating precision error on -9.876532198765) but PyQGIS QgsRound returns a false result.
For this case. I just tested a std::round without m and it's works. I'll add some pytest next week.
Code has comments. Press enter to view.
308
+
return( std::round( number * m * scaleFactor ) / scaleFactor ) * m;
0 commit comments