View Single Post
  #3  
Old 02-22-2006, 12:29 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Stefan
It's using a precision of 0.0001 when comparing if two floating point values are the same. It might be weird it some situations, but since most comparisons are with integer values it is better to use a rather low precision. If you compare 7.9999 with 8 it will show that it is the same, since when you do a lot of math operations then a former integer value might show up as 7.99998 or similar. If you want higher precision you could multiplicate both values with 1000 or so before comparing them.
alright. It just made more sense for me to use a multiplier to increase the total point change anyway. Floats aren't my best friend. Treating them as a string, though, it would probably be possible for me to create a little function to compare them with higher precision.
Reply With Quote