Skip to content

Commit

Permalink
Merge pull request #254 from lynxlynxlynx/master
Browse files Browse the repository at this point in the history
test&doc friday
  • Loading branch information
timlinux committed Sep 28, 2012
2 parents 500a953 + 3c1a778 commit fa43064
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion INSTALL
Expand Up @@ -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


Expand Down
15 changes: 15 additions & 0 deletions resources/function_help/ln-en_US
@@ -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>
16 changes: 16 additions & 0 deletions resources/function_help/log-en_US
@@ -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>
15 changes: 15 additions & 0 deletions resources/function_help/log10-en_US
@@ -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>
3 changes: 3 additions & 0 deletions tests/src/core/testqgsexpression.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit fa43064

Please sign in to comment.