Hi! I am making a Character controller. I am almost finished, I just needed to fix a bug using the following if statement:
if(GetColliderLimit(Vector2.up) > yLimitTop) {
Debug.Log(GetColliderLimit(Vector2.up) + " > " + yLimitTop + " = " + (GetColliderLimit(Vector2.up) > yLimitTop));
//DO THINGS TO FIX THE BUG HERE
}
However, there is a case when it enters the conditional when it shouldn’t. That is when both numbers are 12.
As far as I know, 12 > 12 is not True. Please help! What am I doing wrong? If this is a floating point error, how can I print the full float number (not rounded)?
I made A LOT of Math like this in my script, and this is the only time I got an error like this.
Thank you in advance.