This is something wired happening in my program, hope you can help me I m trying to compare array elements inside a if condition, This works when comparing value is zero.
if((y[5]<0) && (y[4]>0)){
//do something
}
But when i try to compare the value with 20, it fails, if condition is not working!
if((y[5]<20) && (y[4]>20)){
//do something
}
Since my array contains floating numbers, i tried this too, but it too fails,if condition is not working!
if((y[5]<20.00f) && (y[4]>20.00f)){
//do something
}
Any idea why this happens? It drives me crazy! :( :( :(