Quite simply, the subject line.
Basically I want to do this check in an IF statement
|a - b|
| --- | < eps
| c |
and I wanted to know if there was a method for absolute. If not I'm thinking the best way to do it is put a-b/c in a variable, check the positivity/negativity, change it if necessary and then do the check:
if(definedVariable < eps);
Sooooooooo, does anyone know of a method which will save me a few lines of code?
Cheers,
Pete
Basically I want to do this check in an IF statement
|a - b|
| --- | < eps
| c |
and I wanted to know if there was a method for absolute. If not I'm thinking the best way to do it is put a-b/c in a variable, check the positivity/negativity, change it if necessary and then do the check:
if(definedVariable < eps);
Sooooooooo, does anyone know of a method which will save me a few lines of code?
Cheers,
Pete