pyomeca / ezc3d

Easy to use C3D reader/writer for C++, Python and Matlab
https://pyomeca.github.io/Documentation/ezc3d/index.html
MIT License
145 stars 46 forks source link

Fix for #264 #265

Closed felixchenier closed 2 years ago

felixchenier commented 2 years ago

This change is Reviewable

codecov[bot] commented 2 years ago

Codecov Report

Merging #265 (a51e8a2) into dev (ce8d6ed) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev     #265   +/-   ##
=======================================
  Coverage   96.67%   96.67%           
=======================================
  Files          30       30           
  Lines        5297     5297           
=======================================
  Hits         5121     5121           
  Misses        176      176           

Help us with your feedback. Take ten seconds to tell us how you rate us.

felixchenier commented 2 years ago

Wait, this comparison works but is too permissive due to the full rounding. I'll submit another, better PR.

felixchenier commented 2 years ago

Hi @pariterre I modified this PR to put a proper almost-equal float comparison in c3d.write(). I think this would ready to merge, but I didn't run the test suite since I don't have the dev setup configured for building. I can only tell that the same modification applied to my stock ezc3d installation (conda, 1.5.0) works.

pariterre commented 2 years ago

Hi @pariterre I modified this PR to put a proper almost-equal float comparison in c3d.write(). I think this would ready to merge, but I didn't run the test suite since I don't have the dev setup configured for building. I can only tell that the same modification applied to my stock ezc3d installation (conda, 1.5.0) works.

No worries, AppVeyor runs the tests from github and they pass! Thanks for the PR :)