-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Floating point rounding error when writing c3d #264
Comments
In any case, changing these lines to
solves the problem. |
Hi @felixchenier Thanks! |
felixchenier
added a commit
to felixchenier/ezc3d
that referenced
this issue
Aug 5, 2022
felixchenier
referenced
this issue
Jan 19, 2023
I feel that this method is a smoother alternative. This will be able to perform the check without any errors caused and would not rely on other functions to smooth the value out.
felixchenier
added a commit
to felixchenier/ezc3d
that referenced
this issue
Jan 19, 2023
This re-solves pyomeca#264 which had been cancelled by commit ba50ee5
Merged
felixchenier
added a commit
to kineticstoolkit/kineticstoolkit
that referenced
this issue
Mar 9, 2023
…zc3d#264 has been patched in ezc3d.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Salut Benjamin
In ezc3d/init.py, lines 481 to 487:
I think there should be accommodation for floating-point rounding error before raising the ValueError. I have some data where nb_analog_frames = 4420, but the calculation of
gives 4420.000000000001.
So I get a ValueError instead of successfully saving the c3d. In my view this is only a floating-point difference and the function should go on with saving anyway. I could modify it myself and do a PR, but I'm not sure, is this code autogenerated or it's manually maintained?
Thanks
The text was updated successfully, but these errors were encountered: