Page MenuHome

Using relative threshold for floats in mesh comparison
ClosedPublic

Authored by Himanshi Kalra (calra) on Aug 19 2021, 9:11 PM.

Details

Summary

Changes the threshold comparison from absolute to relative.
Removes threshold for MLoopCol comparison.

Merge branch 'master' into threshold

Diff Detail

Repository
rB Blender
Branch
threshold (branched from master)
Build Status
Buildable 16560
Build 16560: arc lint + arc unit

Event Timeline

Himanshi Kalra (calra) requested review of this revision.Aug 19 2021, 9:11 PM
Himanshi Kalra (calra) created this revision.
  • Move threshold compare function near other functions
  • Merge branch 'master' into threshold
source/blender/blenlib/intern/math_base_inline.c
659
  • Clang-tidy: Remove extra else after return

Please still update the comment, otherwise this looks good to me.

source/blender/blenkernel/intern/mesh.c
469–476

unnecessary newline

470

Use a loop that iterates from 0 to 2.

source/blender/blenlib/intern/math_base_inline.c
654

There is not really a danger of dividing by zero here, because there is no division in this function.
I suggest Avoid letting the threshold get too small just because the values happen to be close to zero.

This revision is now accepted and ready to land.Aug 23 2021, 4:58 PM
Himanshi Kalra (calra) marked 4 inline comments as done.
  • Addressed comments