I'm doing a bouncing ball game. i'm using y=mx + b
I want to know when y hits certain numbers. that means it had a collision. the numbers are whole numbers like 539 etc. I increment Y slowly because i also want to not let x move much. when i do
y+=.25; things are ok. y is a double.
if i do y+=.1; i have problems
I looked at the output, and instead of Y being equal to say 539, it's
538.9999999999998176 or something.
whats going on? how to get rid of this fuzyness particularly in cases where i know i'm just adding .1.