mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-22 00:14:55 -05:00
qgsRound: places should be of integer type instead of double
This commit is contained in:
parent
e948120b7b
commit
b4d01e461f
@ -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 );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user