• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to use <xen:calc ''> = an integer


Well-known member
{xen:calc "round(5 / 2)"}
Output: 3
{xen:calc "floor(5 / 2)"}
Output: 2
{xen:calc "ceil(5 / 2)"}
Output: 3

Other functions compatible with the calc helper: abs, max, min, pow.

Check php manual to see what is the effect of these functions. You can also check inside XenForo templates. There are some.
Is there some documentation for the different xen:calc functions like 'floor', 'round'. 'ceiling' ? Could someone point me to it... having a hard time finding anything even with some good searches...