diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-14 10:14:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-14 10:14:15 +0400 |
commit | ee9a00948b950f8361ef280b5f88674721a6698f (patch) | |
tree | f75025f04750f530692baf00cc924bbb57d4f5f2 /source/blender/blenlib/BLI_math_vector.h | |
parent | f15c15e992a9836a7295166af275522690ada315 (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/BLI_math_vector.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_vector.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index 1a24acfe1a5..b8b53f1ba7c 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -176,6 +176,7 @@ MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const flo /* - angle_normalized_* is faster equivalent if vectors are normalized */ float angle_v2v2(const float a[2], const float b[2]); +float angle_signed_v2v2(const float v1[2], const float v2[2]); float angle_v2v2v2(const float a[2], const float b[2], const float c[2]); float angle_normalized_v2v2(const float a[2], const float b[2]); float angle_v3v3(const float a[3], const float b[3]); |