Need help for if condition with tolerance
in
Programming Questions
•
3 years ago
Hi,
I have a problem where I am trying to writing an if conditioning statement:
float a, b;
if (a == b) {
then do something...
}
What I really want is to allow some kind of tolerance so that "a" can be +/- some tolerance of "b". Not exactly equal.
Thanks
1