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:
authorCampbell Barton <ideasman42@gmail.com>2012-03-14 10:14:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-14 10:14:15 +0400
commitee9a00948b950f8361ef280b5f88674721a6698f (patch)
treef75025f04750f530692baf00cc924bbb57d4f5f2 /source/blender/blenlib/intern/math_vector_inline.c
parentf15c15e992a9836a7295166af275522690ada315 (diff)
mathutils py api:
Vector.angle_signed(other) for 2D vectors to get the clockwise angle between them. in BLI math its called - angle_signed_v2v2() shorthand for... atan2f((v1[1] * v2[0]) - (v1[0] * v2[1]), dot_v2v2(v1, v2)) also corrects compile error in last commit.
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 6414245fb3e..96587da9784 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -625,6 +625,12 @@ MINLINE void normal_float_to_short_v3(short out[3], const float in[3])
/********************************* Comparison ********************************/
+
+MINLINE int is_zero_v2(const float v[3])
+{
+ return (v[0] == 0 && v[1] == 0);
+}
+
MINLINE int is_zero_v3(const float v[3])
{
return (v[0] == 0 && v[1] == 0 && v[2] == 0);