02-07-2006 07:40 AM
02-07-2006 07:56 AM
02-07-2006 08:43 AM
Here's another idea. Before you compare the numbers, use the format into string function and wire %.8f (or whatever precision you need) to the format string. Then compare the strings. I just did some testing, and it doesn't add any significant amount of time. With a loop running 10 million times, it added about 30 ms over simply comparing the floats. So if you're not running it continuously, you should never see a slow down.
Of course Shane's idea works, too, but if there was a case when it didn't work for you, this might also help.
02-07-2006 03:44 PM