Hi
In order to compare floating point numbers in B3D meaningfully, I believe I have to use an 'epsilon' value when making the comparisons, something like:
My question is: is that epsilon value the correct one to use for all situations, or does it sometimes need to be set to a bigger value?
To simply demonstrate what I want to be able to do, imagine a point in 3D space with a given X coord, and another point moving towards it along the X axis. I want to be able to find when the moving point has reached or gone beyond the stationary point.
Any help appreciated. :)
In order to compare floating point numbers in B3D meaningfully, I believe I have to use an 'epsilon' value when making the comparisons, something like:
epsilon# = 0.0000001 If Abs(a#-b#) < epsilon
My question is: is that epsilon value the correct one to use for all situations, or does it sometimes need to be set to a bigger value?
To simply demonstrate what I want to be able to do, imagine a point in 3D space with a given X coord, and another point moving towards it along the X axis. I want to be able to find when the moving point has reached or gone beyond the stationary point.
Any help appreciated. :)