diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-17 08:14:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-08-17 08:16:34 +0300 |
commit | 4c8d68c03293a36fd28b3401833a465f24020ce5 (patch) | |
tree | 64ba156eb9693515a983b01a6d259506aa6fe1ac /source/blender/bmesh/intern | |
parent | 736b6a70a492e35c2be9e1f6bb6b26a057fbdf58 (diff) |
Cleanup: replace degenerate check with assert
Use an assert since this should never happen.
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh_normals.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.c b/source/blender/bmesh/intern/bmesh_mesh_normals.c index a5e41b74ee1..186c85abe58 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_normals.c +++ b/source/blender/bmesh/intern/bmesh_mesh_normals.c @@ -85,10 +85,9 @@ BLI_INLINE void bm_vert_calc_normals_accum_loop(const BMLoop *l_iter, dotprod = -dotprod; } const float fac = saacos(-dotprod); - /* NAN detection, otherwise this is a degenerated case, ignore that vertex in this case. */ - if (fac == fac) { - madd_v3_v3fl(v_no, f_no, fac); - } + /* Shouldn't happen as normalizing edge-vectors cause degenerate values to be zeroed out. */ + BLI_assert(!isnan(fac)); + madd_v3_v3fl(v_no, f_no, fac); } static void bm_vert_calc_normals_impl(BMVert *v) |