QGIS API Documentation
3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
src
core
qgsmathutils.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmathutils.h
3
----------------------
4
begin : July 2025
5
copyright : (C) 2025 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#include "qgis_core.h"
17
#include "
qgis_sip.h
"
18
19
#include <QObject>
20
21
#ifndef QGSMATHUTILS_H
22
#define QGSMATHUTILS_H
23
29
class
CORE_EXPORT
QgsMathUtils
30
{
31
Q_GADGET
32
33
public
:
34
44
Q_INVOKABLE
static
void
doubleToRational
(
double
value, qlonglong &numerator
SIP_OUT
, qlonglong &denominator
SIP_OUT
,
double
tolerance = 1.0e-9,
int
maxIterations = 100 );
45
46
};
47
48
#endif
// QGSMATHUTILS_H
QgsMathUtils
Contains utility functions for mathematical operations.
Definition
qgsmathutils.h:30
QgsMathUtils::doubleToRational
static Q_INVOKABLE void doubleToRational(double value, qlonglong &numerator, qlonglong &denominator, double tolerance=1.0e-9, int maxIterations=100)
Converts a double value to a rational fraction.
Definition
qgsmathutils.cpp:23
qgis_sip.h
SIP_OUT
#define SIP_OUT
Definition
qgis_sip.h:58
Generated on
for QGIS API Documentation by
1.15.0