[Closed] Problems with accuracy
I have a small problem with max. I am working on an animation function and the way it works is that I get the original rotation of the mesh and after every frame it finds the difference and writes the changed data to an external file but the only problem is that I am getting exponentials such as “(quat 0 -5.96046e-007 0 1)” Is there a way to fix this?
My code is correct, I am sure of it, its just something Max is doing.
Welcome to the world of single-precision floats. You might have not noticed these accumulated errors before, but there’s no universal way around them. You can try and compare them to some epsilon, let’s say consider all values in range -1e-6…1e-6 to be zero (that comes in handy for the accumulated errors), sometimes, you can also use the close_enough function or compute the precision of the number yourself when comparing to another similar number.