Fix error in using "more" or "less" with decreasing values.
Fix error in using "more" or "less" with decreasing values.
When using a script condition that has a decreasing value, e.g.,
BuffRemains(), the value is a function
f(t) = value + (t - origin) * rate
where rate is negative. When using the "more"/"less" comparators, e.g.,
BuffRemains(more 3), this effectively solves the following inequality:
f(t) = value + (t - origin) * rate > 3
When the rate is negative, the inequality is reversed, and you end up
with:
t < (3 - value)/rate + origin
Prior to this commit, Ovale was using the wrong answer of:
t > (3 - value)/rate + origin
This had broken scripts that were using the verbose method of comparing
values.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@751 d5049fe3-3747-40f7-a4b5-f36d6801af5f