I need to compare the absolute values of two variables but there doesn't seem to be any function or operator to do that.
Normally I'd do something like:
if abs(a) > abs(b) then ...
The simplest way seems to be:
if a*a > b*b
Can anyone suggest a better way to do this? Is there a speed penalty for those extra multiplications, or shouldn't I worry about it? Should I use parenthesis, e.g. (a*a)?