Welcome guest, please Login or Register

EEC.MS - ExpressionEngine add-ons

You are here: HomeForum Home → Free add-ons → Plugins → Thread

   

MX Calculator : version 1.0.2 download / bug tracker / future requests

Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

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

     
Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

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

     
Rank

Total Posts: 6

Joined 2010-11-03

PM

How early does this parse? I need it to divide count in an if statement.

     
Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

it is plugin so based on the plugins parsed order. Could you give example of your code?

     
Rank

Total Posts: 6

Joined 2010-11-03

PM

{if count == round({embed:limit}/2)}

This is basically what I want to achieve (shown without any plugin code)

     
Rank

Total Posts: 2

Joined 2011-03-01

PM

Is this plugin EE2 compatible only? Devotee lists it as EE1 compatible too but it seems not be working on EE 1.7.

     
Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

Hello,
no,  sorry, but it’s only for EE2 and on http://devot-ee.com/add-ons/mx-calculator/  it indicated as “EE2 only”.

     
Rank

Total Posts: 2

Joined 2011-03-01

PM

Thanks, I must have looked at a different one and got mixed up. Thanks anyway.