i = 0;
if(0 <= i <= 0)
this returns false.
I don't understand this at all. Watch window I also tried making the statement read (0 <= i && i <= 0)
when I test them individually 0 <= i
returns false while i <= 0
returns true. they both should be true. I'm not sure if this is a precision thing but I wouldn't think so since I'm hard coding the values in. Please help me understand this fundamental problem.
If it helps I am trying to evaluate if a point is on a line by getting the intersection point and then checking if it's between the x and y start point and end point. this becomes a problem when I am trying to check when x or y is on its axis then you run into the problem of checking if 0 is between or equal to 0 and 0. Which it is so it would fall on the line.