diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 12:23:02 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 12:23:02 +0300 |
commit | a29686eeb3af051a00fbb8a8b9be06bcd050ec8c (patch) | |
tree | 9da60e7257e3e2dafda3e9b565b77c9c6f37675b /source/blender/blenlib/intern/math_vector.c | |
parent | e0c51b466f3b23a1fc114690be2b008e19637ea6 (diff) |
Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenlib` module. Not all warnings are
addressed in this commit.
No functional changes.
Diffstat (limited to 'source/blender/blenlib/intern/math_vector.c')
-rw-r--r-- | source/blender/blenlib/intern/math_vector.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 7f1840228e2..909d508e262 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -506,11 +506,10 @@ float angle_normalized_v3v3(const float v1[3], const float v2[3]) if (dot_v3v3(v1, v2) >= 0.0f) { return 2.0f * saasin(len_v3v3(v1, v2) / 2.0f); } - else { - float v2_n[3]; - negate_v3_v3(v2_n, v2); - return (float)M_PI - 2.0f * saasin(len_v3v3(v1, v2_n) / 2.0f); - } + + float v2_n[3]; + negate_v3_v3(v2_n, v2); + return (float)M_PI - 2.0f * saasin(len_v3v3(v1, v2_n) / 2.0f); } float angle_normalized_v2v2(const float v1[2], const float v2[2]) @@ -523,11 +522,10 @@ float angle_normalized_v2v2(const float v1[2], const float v2[2]) if (dot_v2v2(v1, v2) >= 0.0f) { return 2.0f * saasin(len_v2v2(v1, v2) / 2.0f); } - else { - float v2_n[2]; - negate_v2_v2(v2_n, v2); - return (float)M_PI - 2.0f * saasin(len_v2v2(v1, v2_n) / 2.0f); - } + + float v2_n[2]; + negate_v2_v2(v2_n, v2); + return (float)M_PI - 2.0f * saasin(len_v2v2(v1, v2_n) / 2.0f); } /** |