Template Variables: Difference between revisions

Jump to navigation Jump to search
Andrian (talk | contribs)
Andrian (talk | contribs)
Line 711: Line 711:
Rounding and controlling decimal places:
Rounding and controlling decimal places:


Default:
2 [/] 3 = 0.66666666666667
2 [/] 3 = 0.66666666666667


Rounding to the nearest integer:
2 [/.0] 3 = 1
2 [/.0] 3 = 1


Rounding to 1 decimal place:
2 [/.1] 3 = 0.7
2 [/.1] 3 = 0.7


2 decimal places:
2 [/.2] 3 = 0.67
2 [/.2] 3 = 0.67


3 decimal places:
2 [/.3] 3 = 0.667
2 [/.3] 3 = 0.667


4 decimal places:
2 [/.4] 3 = 0.6667
2 [/.4] 3 = 0.6667


[-.0] - will multiply the two numbers either side of the template variable and round to the nearest integer
This works on all operators including [MIN] and [MAX]


[*.1] - will multiply the two numbers either side of the template variable and round to 1 decimal place


[*.2] - will multiply the two numbers either side of the template variable and round to 2 decimal places
  Note: The math functions will only work with numbers with a decimal point (not a decimal comma) and no thousands separator and no currency symbol.
 
[*.3] - will multiply the two numbers either side of the template variable and round to 3 decimal places
 
[*.4] - will multiply the two numbers either side of the template variable and round to 4 decimal places
 
 
[/.0] - will divide the number left of the template variable by the number right and round to the nearest integer
 
[/.1] - will divide the number left of the template variable by the number right and round to 1 decimal place
 
[/.2] - will divide the number left of the template variable by the number right and round to 2 decimal places
 
[/.3] - will divide the number left of the template variable by the number right and round to 3 decimal places
 
[/.4] - will divide the number left of the template variable by the number right and round to 4 decimal places
 
 
[+.0] - will add the two numbers either side of the template variable and round to the nearest integer
 
[+.1] - will add the two numbers either side of the template variable and round to 1 decimal place
 
[+.2] - will add the two numbers either side of the template variable and round to 2 decimal places
 
[+.3] - will add the two numbers either side of the template variable and round to 3 decimal places
 
[+.4] - will add the two numbers either side of the template variable and round to 4 decimal places
 
 
[-.0] - will subtract the number right of the template variable from the number left and round to the nearest integer
 
[-.1] - will subtract the number right of the template variable from the number left and round to 1 decimal place
 
[-.2] - will subtract the number right of the template variable from the number left and round to 2 decimal places
 
[-.3] - will subtract the number right of the template variable from the number left and round to 3 decimal places
 
[-.4] - will subtract the number right of the template variable from the number left and round to 4 decimal places
 
 
[MIN.0] - will show the lowest of the numbers left and right  of the template variable and round to the nearest integer
 
[MIN.1] - will show the lowest of the numbers left and right  of the template variable and round to 1 decimal place
 
[MIN.2] - will show the lowest of the numbers left and right  of the template variable and round to 2 decimal places
 
[MIN.3] - will show the lowest of the numbers left and right  of the template variable and round to 3 decimal places
 
[MIN.4] - will show the lowest of the numbers left and right  of the template variable and round to 4 decimal places
 
 
[MAX.0] - will show the highest of the numbers left and right  of the template variable and round to the nearest integer
 
[MAX.1] - will show the highest of the numbers left and right  of the template variable and round to 1 decimal place
 
[MAX.2] - will show the highest of the numbers left and right  of the template variable and round to 2 decimal places
 
[MAX.3] - will show the highest of the numbers left and right  of the template variable and round to 3 decimal places
 
[MAX.4] - will show the highest of the numbers left and right  of the template variable and round to 4 decimal places
 
 
 
  Note: The math functions will only work with numbers with a decimal point and no thousands separator and no currency symbol.


== Currency Conversion ==
== Currency Conversion ==