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

Fix graphene_box_get_center() #166

Merged
merged 5 commits into from
Aug 8, 2019
Merged

Fix graphene_box_get_center() #166

merged 5 commits into from
Aug 8, 2019

Commits on Aug 8, 2019

  1. box: Check for empty and infinite boxes in equal()

    We cannot rely on a consistent behaviour with infinities across
    different platforms, architectures, toolchains, and SIMD
    implementations. This means we need to check if a box's minimum and
    maximum vertices contain infinities before comparing the vertices.
    ebassi committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    ab22ddb View commit details
    Browse the repository at this point in the history
  2. box: Handle empty and infinite boxes a bit better

    Before we go into SIMD operations, we need to check for infinities,
    given that we might end up in an empty or infinite box.
    ebassi committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    1f4847d View commit details
    Browse the repository at this point in the history
  3. box: Fix get_center()

    We're subtracting the minimum and maximum coordinates, but that only
    works if the minimum point is centered in (0, 0, 0).
    ebassi committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    a30a446 View commit details
    Browse the repository at this point in the history
  4. box: Reimplement get_bounding_sphere()

    Instead of open-coding it, we should reuse the existing Box API, so we
    avoid duplicating bugs.
    
    Fixes: #165
    ebassi committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    1ecc632 View commit details
    Browse the repository at this point in the history
  5. tests/box: Check get_center()'s specification

    Add more expectations on the behaviour of get_center(), especially when
    the minimum point of the box is not centered in (0, 0, 0).
    ebassi committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    a80f1f3 View commit details
    Browse the repository at this point in the history