Skip to content
Browse files

Add expression function help

  • Loading branch information
NathanW2 committed Sep 4, 2012
1 parent 2ef60da commit 72978cf6159f581fbbababca65ee6cd72c4c2f5e
@@ -0,0 +1,12 @@
<h3>$scale function</h3>
Returns the current scale of the map canvas.
Note: This function is only available in some contexts and will be 0 otherwise.

<!-- Show example of function.-->
<code>$scale &rarr; 10000</code><br>

@@ -0,0 +1,16 @@
<h3>format_number() function</h3>
Returns a number formatted with the locale separator for thousands.
Also truncates the number to the number of supplied places.

<code>number</code> - is number. The number to be formatted.
<code>places</code> - is int. The number of decimal places to truncate the string

<!-- Show example of function.-->
<code>format_number(10000000.332,2) &rarr; 10,000,000.33</code>

@@ -0,0 +1,20 @@
<h3>round() function</h3>
Rounds a number to number of decimal places.
This function can take one or two arguments depending on what is needed.

<code>decimal</code> - is decimal. The decimal number to be rounded.
<code>places</code> - is int. The number of places to round decimal too. Can be negative.

<!-- Show example of function.-->
<code>round(1234.567, 2 ) &rarr; 1234.57</code><br>
use <code>round(decimal)</code> to round to the nearest integer<br>
<code>round(1234.567) &rarr; 1235</code><br>

0 comments on commit 72978cf

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