Skip to content
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

DM-9765: Suspicious numerical precision code in Angle #237

Merged
merged 3 commits into from
May 25, 2017
Merged

Commits on May 25, 2017

  1. Fix limit handling in Angle.wrapNear

    A test for the result of Angle.wrapNear being too small
    applied the incorrect correction when the wrapped result was positive.
    Added a test that shows the problem (it was not easy to trigger,
    but setting wrapRef to 5 did the trick).
    Adding wrapRef caused indentation to be so deep that I switched
    to using itertools.product to tame it.
    r-owen committed May 25, 2017
    Configuration menu
    Copy the full SHA
    1a80cdc View commit details
    Browse the repository at this point in the history
  2. Modify wrapNear limits handling code

    instead of adding a small value if the lower limit is exceeded,
    add 2 pi. This simplies the code and gives better accuracy.
    r-owen committed May 25, 2017
    Configuration menu
    Copy the full SHA
    97a02d8 View commit details
    Browse the repository at this point in the history
  3. Modernized testAngle.py

    Use more specific asserts where useful.
    Remove unneeded checks of angle != None.
    Remove useless print statements.
    r-owen committed May 25, 2017
    Configuration menu
    Copy the full SHA
    da074f1 View commit details
    Browse the repository at this point in the history