Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/math_vector.c')
-rw-r--r--source/blender/blenlib/intern/math_vector.c18
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);
}
/**