Checking if object coordinates equal to certain coordinates
#6

Quote:
Originally Posted by Vince
View Post
Actually, due to the way floating point values work and how they are stored, an exact comparison usually isn't recommended. If one of the values retrieved from GetObjectPos is off by 0.0001 the code will cease to work. You should check whether the object is in the approximate area.
It's true I would also add as a rule of thumb when working with floats use Less than or equal to <= and/or >= greater than or equal to when making comparisons.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)