You are here: Home → Forum Home → Free add-ons → Plugins → Thread
MX Calculator provides mathematical operations in ExpressionEngine 2 templates.
MX Calc is build with modified class EvalMath (thanks to Miles Kaufmann) for safely evaluate math expressions.
this topic is closed. New addon page
Usage examples:
you can used it as single tag
{exp:mx_calc expression="-4(15/42)^23*(4-sqrt(16))-15"}
or as tag pair
{exp:mx_calc expression="-4(15/42)^23*(4-sqrt(16))-15"}
Cost = {calc_result}
{/exp:mx_calc}
avalible functions:
average
{exp:mx_calc expression="average(4, 8, 15, 16, 23, 42)"}
max
{exp:mx_calc expression="max(4, 8, 15, 16, 23, 42)"}
min
{exp:mx_calc expression="min(4, 8, 15, 16, (3*3+8+2*3), 42)"}
mod
{exp:mx_calc expression="mod(4, 15)"}
power
{exp:mx_calc expression="power(4,2)"}
round
{exp:mx_calc expression="round(((4*5/16)/15),2)"}
sum
{exp:mx_calc expression="sum(4, 8, 15, 16, 23, 42)"}
ceil
{exp:mx_calc expression="ceil((4*5/16) / 15)"}
pi
{exp:mx_calc expression="pi()"} <br/>
sqrt
{exp:mx_calc expression="-4(15/42)^23*(4-sqrt(16))-15"}
sin
{exp:mx_calc expression="-4(15/42)^23*(4-sin(16))-15"}
sinh
arcsin
asin
arcsinh
asinh
cos
cosh
arccos
acos
arccosh
acosh
tan
tanh
arctan
atan
arctanh
atanh
abs
ln
log
How early does this parse? I need it to divide count in an if statement.
it is plugin so based on the plugins parsed order. Could you give example of your code?
{if count == round({embed:limit}/2)}
This is basically what I want to achieve (shown without any plugin code)
Is this plugin EE2 compatible only? Devotee lists it as EE1 compatible too but it seems not be working on EE 1.7.
Hello,
no, sorry, but it’s only for EE2 and on http://devot-ee.com/add-ons/mx-calculator/ it indicated as “EE2 only”.
Thanks, I must have looked at a different one and got mixed up. Thanks anyway.