Just had a problem with percent getting when the first number is bigger than the second.
Solved the problem by making an aliases for that and here it is, may be pretty handy for some of you guys.
Syntax: $percent(x,y,round).suf or /percent x y round
Examples:
This is the maximum functionality that could be needed and it's only one line. :)
alias percent $iif($isid,return,echo -at) $round($iif($1 > $2,$calc(100 - $calc($iif($1 > $2,$2 / $1 * 100,$1 / $2 * 100))),$calc($iif($1 > $2,$2 / $1 * 100,$1 / $2 * 100))),$iif($3,$v1,15)) $+ $iif($prop = suf,$chr(37))
Even so, what does 83% have to do with that?
And why would you want it to limit to 100%? If something is over 100% it's over 100%, not 83% :\
Oh I see, 1/6 = 16.66666% so somehow that translates to 83.3333%
Still..that's kind of a weird way of dealing with a case that shouldn't necessarily be dealt with.