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

round_ties_up fix #9548

Merged
merged 2 commits into from
Aug 23, 2023
Merged

Commits on Aug 23, 2023

  1. round_ties_up checks the predicate:

     `0. <= value || value.fract() != 0.5`
     which is meant to determine if the value is negative with a fractional part of `0.5`.
    
     However given a negative value, `fract` returns a negative fraction so the predicate is true for all numeric values and `ceil` is never called.
    
    Solution:
    Changed the predicate to `value.fract() != -0.5` and added a test.
    
    Also improved the comments for `round_layout_coords`.
    ickshonpe committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    4ad533e View commit details
    Browse the repository at this point in the history
  2. removed other test

    ickshonpe committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    93ee033 View commit details
    Browse the repository at this point in the history