Skip to content

Commit b4d01e4

Browse files
lbartolettinyalldawson
authored andcommittedFeb 7, 2019
qgsRound: places should be of integer type instead of double
1 parent e948120 commit b4d01e4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎python/core/auto_generated/qgis.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ bool qgsDoubleNearSig( double a, double b, int significantDigits = 10 );
123123
Compare two doubles using specified number of significant digits
124124
%End
125125

126-
double qgsRound( double number, double places );
126+
double qgsRound( double number, int places );
127127
%Docstring
128128
Returns a double ``number``, rounded (as close as possible) to the specified number of ``places``.
129129

‎src/core/qgis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ inline bool qgsDoubleNearSig( double a, double b, int significantDigits = 10 )
301301
*
302302
* \since QGIS 3.0
303303
*/
304-
inline double qgsRound( double number, double places )
304+
inline double qgsRound( double number, int places )
305305
{
306306
double m = ( number < 0.0 ) ? -1.0 : 1.0;
307307
double scaleFactor = std::pow( 10.0, places );

0 commit comments

Comments
 (0)
Please sign in to comment.