Comparing two floats
Posted: Wed May 06, 2015 2:06 pm
As you guys know, comparing floats can be very difficult. In my program I need to compare two floats. I could've used things like floorf, but no such functions are recognized by the game editor. Is there a way to go around that and compare two floats?
I need to compare numbers which have two decimal places. Like 2.5 and 2.5. If those are floats, the == almost never will work.
So far I have no idea how to get over that in gE.
I need to compare numbers which have two decimal places. Like 2.5 and 2.5. If those are floats, the == almost never will work.
So far I have no idea how to get over that in gE.