bool func(double &u, double &v){
.
.
.
if((u+v) <= 1.0)
return false;
cout <<"u: " << u << " v: " << v << endl;
return true;
}
I have a function like this. Output is:
u: 0.914812 v: 0.0851877
Their sum is: 0.9999997. However the program does not go in the if statement. It returns true. Why?