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>2014-03-28 08:02:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-28 08:02:57 +0400
commit5981567ec6afb3ae95f24c28b2c72bff0d8e01e6 (patch)
tree6de07252b408ae2f417dc751be550b40c2e856a1 /source/blender/blenlib/intern/math_vector_inline.c
parent7199e2288f3df27ee2d21593da64ef4597fb86fd (diff)
Code cleanup: use len_v2v2_int for view zoom-scale
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 45a0cb3f8e2..59d5f7e7627 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -676,6 +676,15 @@ MINLINE float len_v2v2(const float v1[2], const float v2[2])
return sqrtf(x * x + y * y);
}
+MINLINE float len_v2v2_int(const int v1[2], const int v2[2])
+{
+ float x, y;
+
+ x = (float)(v1[0] - v2[0]);
+ y = (float)(v1[1] - v2[1]);
+ return sqrtf(x * x + y * y);
+}
+
MINLINE float len_v3(const float a[3])
{
return sqrtf(dot_v3v3(a, a));