diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-11 10:23:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-11 10:24:30 +0300 |
commit | 452674db301f06c1a653b87c14c984acc18c4d29 (patch) | |
tree | d17881b3c651ee807d9a67f97d57b317103939a4 /source | |
parent | c5d0a2320498d1feb7cc2c68fc6504bb187d5a8d (diff) |
Cleanup: minor edit to last commit
Avoid repeating the fallback return.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 1b428d7f054..e0e463615e5 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -4160,11 +4160,11 @@ static float mean_value_half_tan_v3(const struct Float3_Len *d_curr, const float dot = dot_v3v3(d_curr->dir, d_next->dir); const float len = d_curr->len * d_next->len; const float result = (len - dot) / area; - return isfinite(result) ? result : 0.0f; - } - else { - return 0.0f; + if (isfinite(result)) { + return result; + } } + return 0.0f; } static float mean_value_half_tan_v2(const struct Float2_Len *d_curr, @@ -4177,11 +4177,11 @@ static float mean_value_half_tan_v2(const struct Float2_Len *d_curr, const float dot = dot_v2v2(d_curr->dir, d_next->dir); const float len = d_curr->len * d_next->len; const float result = (len - dot) / area; - return isfinite(result) ? result : 0.0f; - } - else { - return 0.0f; + if (isfinite(result)) { + return result; + } } + return 0.0f; } void interp_weights_poly_v3(float *w, float v[][3], const int n, const float co[3]) |