View Single Post
  #2  
Old 02-21-2006, 09:51 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
Reply With Quote