Quote:
Originally Posted by HamletEagle
Unless I misunderstand what you mean by "approximately equal", then (Z - Y) < 5 is exactly what you should be doing.
|
Approximately equal = almost the same
Someone correct me if I'm wrong but,
PHP Code:
X = 5 Y = 3 criteria : < 1
5 - 3 = 2 < 1 = false
3 - 5 = -2 < 1 = true
I think he has to use abs() on X - Y before comparing it.
__________________