Skip to content
Permalink
Browse files

qgsRound: places should be of integer type instead of double

  • Loading branch information
lbartoletti authored and nyalldawson committed Feb 7, 2019
1 parent e948120 commit b4d01e461f16bd55e36510c194f80746f0f0376b
Showing with 2 additions and 2 deletions.
  1. +1 −1 python/core/auto_generated/qgis.sip.in
  2. +1 −1 src/core/qgis.h
@@ -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``.

@@ -301,7 +301,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 );

0 comments on commit b4d01e4

Please sign in to comment.
You can’t perform that action at this time.