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

[SofaComponent] Fix computeBBox() #634

Merged
merged 1 commit into from
Apr 18, 2018

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented Apr 11, 2018

Some computeBBox() functions were still using numeric_limits::min() instead of lowest().

numeric_limits::min() returns 0 (more precisely a value very close to it) if T is a floating-point type, whereas numeric_limits::lowest() returns -inf(more precisely -max of T), which is the expected behavior in computeBBox().

http://en.cppreference.com/w/cpp/types/numeric_limits/min
http://en.cppreference.com/w/cpp/types/numeric_limits/lowest


This PR:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings.
  • does not generate new unit test failures.
  • does not generate new scene test failures.
  • does not break API compatibility.
  • is more than 1 week old (or has fast-merge label).

Reviewers will merge only if all these checks are true.

@fredroy fredroy added pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request labels Apr 11, 2018
@hugtalbot hugtalbot added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Apr 12, 2018
@hugtalbot hugtalbot merged commit 5f86d85 into sofa-framework:master Apr 18, 2018
@guparan guparan added this to the v18.06 milestone Jun 18, 2018
@fredroy fredroy deleted the fix_computebbox_min_lowest branch May 13, 2019 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants