From 452674db301f06c1a653b87c14c984acc18c4d29 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 11 Feb 2020 18:23:52 +1100 Subject: Cleanup: minor edit to last commit Avoid repeating the fallback return. --- source/blender/blenlib/intern/math_geom.c | 16 ++++++++-------- 1 file 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]) -- cgit v1.2.3