Skip to content
Permalink
Browse files

Merge pull request #254 from lynxlynxlynx/master

test&doc friday
  • Loading branch information
timlinux committed Sep 28, 2012
2 parents 500a953 + 3c1a778 commit fa43064b73aa56623594d51c3c8b40765da6261a
@@ -110,7 +110,7 @@ Optional dependencies:
- for postgis support and SPIT plugin - PostgreSQL >= 8.0.x
- for gps plugin - expat >= 1.95 and gpsbabel
- for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
- for python support - SIP >= 4.8, PyQt >= must match Qt version, Qscintilla2
- for python support - SIP >= 4.8, PyQt >= must match Qt version, Qscintilla2 with python bindings
- for qgis mapserver - FastCGI


@@ -0,0 +1,15 @@
<h3>ln() function</h3>
Returns the value of the natural logarithm of the passed expression.
<br>
This function takes one argument.
<h4>Syntax</h4>
<code>ln(value)</code><br>

<h4>Arguments</h4>
<code>value</code> - any positive number.
<br>

<h4>Example</h4>
<!-- Show example of function.-->
<code>ln(1) &rarr; 0</code><br>
<code>ln(e) &rarr; 1</code><br>
@@ -0,0 +1,16 @@
<h3>log() function</h3>
Returns the value of the logarithm of the passed value and base.
<br>
This function takes two arguments.
<h4>Syntax</h4>
<code>log(base, value)</code><br>

<h4>Arguments</h4>
<code>base</code> - any positive number.
<code>value</code> - any positive number.
<br>

<h4>Example</h4>
<!-- Show example of function.-->
<code>log(2, 32) &rarr; 5</code><br>
<code>log(0.5, 32) &rarr; -5</code><br>
@@ -0,0 +1,15 @@
<h3>log10() function</h3>
Returns the value of the base 10 logarithm of the passed expression.
<br>
This function takes one argument.
<h4>Syntax</h4>
<code>log10(value)</code><br>

<h4>Arguments</h4>
<code>value</code> - any positive number.
<br>

<h4>Example</h4>
<!-- Show example of function.-->
<code>log10(1) &rarr; 0</code><br>
<code>log10(100) &rarr; 2</code><br>
@@ -246,6 +246,9 @@ class TestQgsExpression: public QObject
QTest::newRow( "log10(100)" ) << "log10(100)" << false << QVariant( 2. );
QTest::newRow( "log(2,32)" ) << "log(2,32)" << false << QVariant( 5. );
QTest::newRow( "log(10,1000)" ) << "log(10,1000)" << false << QVariant( 3. );
QTest::newRow( "log(-2,32)" ) << "log(-2,32)" << false << QVariant( );
QTest::newRow( "log(2,-32)" ) << "log(2,-32)" << false << QVariant( );
QTest::newRow( "log(0.5,32)" ) << "log(0.5,32)" << false << QVariant( -5. );
QTest::newRow( "round(1234.557,2) - round up" ) << "round(1234.557,2)" << false << QVariant( 1234.56 );
QTest::newRow( "round(1234.554,2) - round down" ) << "round(1234.554,2)" << false << QVariant( 1234.55 );
QTest::newRow( "round(1234.6) - round up to int" ) << "round(1234.6)" << false << QVariant( 1235 );

0 comments on commit fa43064

Please sign in to comment.
You can’t perform that action at this time.