
22 Apr
2006
22 Apr
'06
3:06 p.m.
"Alberto Ganesh Barbati" wrote
bool operator()(T x, T y) const { return abs(x - y) < eps; }
Maybe should be: bool operator()(T x, T y) const { return abs(x - y) < abs(eps); } Because I have been caught out when eps was negative ;-) Negaitive eps is easy to do if it is some function of x y or both, which is common e.g percentage etc. regards Andy little