From db051f2b2ddae22b6ff7468ae5cca7884d5b06da Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Sep 2012 04:48:34 +0000 Subject: fix MESH_OT_tris_convert_to_quads() limit options (uv and vertex color) were not working at all. --- source/blender/blenlib/intern/math_vector_inline.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/blenlib/intern/math_vector_inline.c') diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 0a8f57214d7..c409e536b45 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -724,6 +724,15 @@ MINLINE int equals_v4v4(const float v1[4], const float v2[4]) return ((v1[0] == v2[0]) && (v1[1] == v2[1]) && (v1[2] == v2[2]) && (v1[3] == v2[3])); } +MINLINE int compare_v2v2(const float v1[2], const float v2[2], const float limit) +{ + if (fabsf(v1[0] - v2[0]) < limit) + if (fabsf(v1[1] - v2[1]) < limit) + return 1; + + return 0; +} + MINLINE int compare_v3v3(const float v1[3], const float v2[3], const float limit) { if (fabsf(v1[0] - v2[0]) < limit) -- cgit v1.2.3