Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
qgsRound: places should be of integer type instead of double
(cherry picked from commit b4d01e4)
  • Loading branch information
lbartoletti authored and nyalldawson committed Feb 7, 2019
1 parent eb8e36c commit a249e28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgis.sip.in
Expand Up @@ -123,7 +123,7 @@ bool qgsDoubleNearSig( double a, double b, int significantDigits = 10 );
Compare two doubles using specified number of significant digits
%End

double qgsRound( double number, double places );
double qgsRound( double number, int places );
%Docstring
Returns a double ``number``, rounded (as close as possible) to the specified number of ``places``.

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgis.h
Expand Up @@ -314,7 +314,7 @@ inline bool qgsDoubleNearSig( double a, double b, int significantDigits = 10 )
*
* \since QGIS 3.0
*/
inline double qgsRound( double number, double places )
inline double qgsRound( double number, int places )
{
double m = ( number < 0.0 ) ? -1.0 : 1.0;
double scaleFactor = std::pow( 10.0, places );
Expand Down

0 comments on commit a249e28

Please sign in to comment.