mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
Make math utils Q_GADGET
This commit is contained in:
parent
f9faca4445
commit
53d20879de
@ -20,6 +20,9 @@ Contains utility functions for mathematical operations.
|
|||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include "qgsmathutils.h"
|
#include "qgsmathutils.h"
|
||||||
%End
|
%End
|
||||||
|
public:
|
||||||
|
static const QMetaObject staticMetaObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static void doubleToRational( double value, qlonglong &numerator /Out/, qlonglong &denominator /Out/, double tolerance = 1.0e-9, int maxIterations = 100 );
|
static void doubleToRational( double value, qlonglong &numerator /Out/, qlonglong &denominator /Out/, double tolerance = 1.0e-9, int maxIterations = 100 );
|
||||||
|
@ -20,6 +20,9 @@ Contains utility functions for mathematical operations.
|
|||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include "qgsmathutils.h"
|
#include "qgsmathutils.h"
|
||||||
%End
|
%End
|
||||||
|
public:
|
||||||
|
static const QMetaObject staticMetaObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static void doubleToRational( double value, qlonglong &numerator /Out/, qlonglong &denominator /Out/, double tolerance = 1.0e-9, int maxIterations = 100 );
|
static void doubleToRational( double value, qlonglong &numerator /Out/, qlonglong &denominator /Out/, double tolerance = 1.0e-9, int maxIterations = 100 );
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
*/
|
*/
|
||||||
class CORE_EXPORT QgsMathUtils
|
class CORE_EXPORT QgsMathUtils
|
||||||
{
|
{
|
||||||
|
Q_GADGET
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,7 +42,7 @@ class CORE_EXPORT QgsMathUtils
|
|||||||
* \param tolerance desired precision. The returned fraction will be at within this tolerance of the original value.
|
* \param tolerance desired precision. The returned fraction will be at within this tolerance of the original value.
|
||||||
* \param maxIterations maximum number of iterations. Higher values result in better approximations, but at the cost of additional computation.
|
* \param maxIterations maximum number of iterations. Higher values result in better approximations, but at the cost of additional computation.
|
||||||
*/
|
*/
|
||||||
static void doubleToRational( double value, qlonglong &numerator SIP_OUT, qlonglong &denominator SIP_OUT, double tolerance = 1.0e-9, int maxIterations = 100 );
|
Q_INVOKABLE static void doubleToRational( double value, qlonglong &numerator SIP_OUT, qlonglong &denominator SIP_OUT, double tolerance = 1.0e-9, int maxIterations = 100 );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user