mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-16 22:15:21 +02:00
Moved description to top of page
This commit is contained in:
@@ -2,6 +2,22 @@
|
||||
<!-- $Revision$ -->
|
||||
<sect1 id="language.function.math">
|
||||
<title>{math}</title>
|
||||
<para>
|
||||
{math} allows the template designer to do math equations in the
|
||||
template. Any numeric template variables may be used in the
|
||||
equations, and the result is printed in place of the tag. The
|
||||
variables used in the equation are passed as parameters, which can
|
||||
be template variables or static values. +, -, /, *, abs, ceil, cos,
|
||||
exp, floor, log, log10, max, min, pi, pow, rand, round, sin, sqrt,
|
||||
srans and tan are all valid operators. Check the PHP documentation
|
||||
for further information on these math functions.
|
||||
</para>
|
||||
<para>
|
||||
If you supply the special "assign" attribute, the output of the
|
||||
math function will be assigned to this template variable instead of
|
||||
being output to the template.
|
||||
</para>
|
||||
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -57,21 +73,7 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
{math} allows the template designer to do math equations in the
|
||||
template. Any numeric template variables may be used in the
|
||||
equations, and the result is printed in place of the tag. The
|
||||
variables used in the equation are passed as parameters, which can
|
||||
be template variables or static values. +, -, /, *, abs, ceil, cos,
|
||||
exp, floor, log, log10, max, min, pi, pow, rand, round, sin, sqrt,
|
||||
srans and tan are all valid operators. Check the PHP documentation
|
||||
for further information on these math functions.
|
||||
</para>
|
||||
<para>
|
||||
If you supply the special "assign" attribute, the output of the
|
||||
math function will be assigned to this template variable instead of
|
||||
being output to the template.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<title>Technical Note</title>
|
||||
<para>
|
||||
|
Reference in New Issue
Block a user