[Bf-blender-cvs] [452674db301] master: Cleanup: minor edit to last commit
Campbell Barton
noreply at git.blender.org
Tue Feb 11 08:26:02 CET 2020
Commit: 452674db301f06c1a653b87c14c984acc18c4d29
Author: Campbell Barton
Date: Tue Feb 11 18:23:52 2020 +1100
Branches: master
https://developer.blender.org/rB452674db301f06c1a653b87c14c984acc18c4d29
Cleanup: minor edit to last commit
Avoid repeating the fallback return.
===================================================================
M source/blender/blenlib/intern/math_geom.c
===================================================================
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])
More information about the Bf-blender-cvs
mailing list