File tree 5 files changed +50
-1
lines changed
5 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ Optional dependencies:
110
110
- for postgis support and SPIT plugin - PostgreSQL >= 8.0.x
111
111
- for gps plugin - expat >= 1.95 and gpsbabel
112
112
- for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
113
- - for python support - SIP >= 4.8, PyQt >= must match Qt version, Qscintilla2
113
+ - for python support - SIP >= 4.8, PyQt >= must match Qt version, Qscintilla2 with python bindings
114
114
- for qgis mapserver - FastCGI
115
115
116
116
Original file line number Diff line number Diff line change
1
+ <h3>ln() function</h3>
2
+ Returns the value of the natural logarithm of the passed expression.
3
+ <br>
4
+ This function takes one argument.
5
+ <h4>Syntax</h4>
6
+ <code>ln(value)</code><br>
7
+
8
+ <h4>Arguments</h4>
9
+ <code>value</code> - any positive number.
10
+ <br>
11
+
12
+ <h4>Example</h4>
13
+ <!-- Show example of function.-->
14
+ <code>ln(1) → 0</code><br>
15
+ <code>ln(e) → 1</code><br>
Original file line number Diff line number Diff line change
1
+ <h3>log() function</h3>
2
+ Returns the value of the logarithm of the passed value and base.
3
+ <br>
4
+ This function takes two arguments.
5
+ <h4>Syntax</h4>
6
+ <code>log(base, value)</code><br>
7
+
8
+ <h4>Arguments</h4>
9
+ <code>base</code> - any positive number.
10
+ <code>value</code> - any positive number.
11
+ <br>
12
+
13
+ <h4>Example</h4>
14
+ <!-- Show example of function.-->
15
+ <code>log(2, 32) → 5</code><br>
16
+ <code>log(0.5, 32) → -5</code><br>
Original file line number Diff line number Diff line change
1
+ <h3>log10() function</h3>
2
+ Returns the value of the base 10 logarithm of the passed expression.
3
+ <br>
4
+ This function takes one argument.
5
+ <h4>Syntax</h4>
6
+ <code>log10(value)</code><br>
7
+
8
+ <h4>Arguments</h4>
9
+ <code>value</code> - any positive number.
10
+ <br>
11
+
12
+ <h4>Example</h4>
13
+ <!-- Show example of function.-->
14
+ <code>log10(1) → 0</code><br>
15
+ <code>log10(100) → 2</code><br>
Original file line number Diff line number Diff line change @@ -246,6 +246,9 @@ class TestQgsExpression: public QObject
246
246
QTest::newRow ( " log10(100)" ) << " log10(100)" << false << QVariant ( 2 . );
247
247
QTest::newRow ( " log(2,32)" ) << " log(2,32)" << false << QVariant ( 5 . );
248
248
QTest::newRow ( " log(10,1000)" ) << " log(10,1000)" << false << QVariant ( 3 . );
249
+ QTest::newRow ( " log(-2,32)" ) << " log(-2,32)" << false << QVariant ( );
250
+ QTest::newRow ( " log(2,-32)" ) << " log(2,-32)" << false << QVariant ( );
251
+ QTest::newRow ( " log(0.5,32)" ) << " log(0.5,32)" << false << QVariant ( -5 . );
249
252
QTest::newRow ( " round(1234.557,2) - round up" ) << " round(1234.557,2)" << false << QVariant ( 1234.56 );
250
253
QTest::newRow ( " round(1234.554,2) - round down" ) << " round(1234.554,2)" << false << QVariant ( 1234.55 );
251
254
QTest::newRow ( " round(1234.6) - round up to int" ) << " round(1234.6)" << false << QVariant ( 1235 );
You can’t perform that action at this time.
0 commit comments