[Bf-blender-cvs] [1394c0b8527] tmp-gltexture: BLI: Math: Add equals_v3v3_int

Clément Foucault noreply at git.blender.org
Sat Sep 5 01:58:28 CEST 2020


Commit: 1394c0b8527913c9b31bc53552717e4a2d9fe933
Author: Clément Foucault
Date:   Fri Sep 4 21:07:26 2020 +0200
Branches: tmp-gltexture
https://developer.blender.org/rB1394c0b8527913c9b31bc53552717e4a2d9fe933

BLI: Math: Add equals_v3v3_int

===================================================================

M	source/blender/blenlib/BLI_math_vector.h
M	source/blender/blenlib/intern/math_vector_inline.c

===================================================================

diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index 1425e7da1bc..9ecffc3e365 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -338,6 +338,7 @@ MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RE
 MINLINE bool equals_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT;
 
 MINLINE bool equals_v2v2_int(const int v1[2], const int v2[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool equals_v3v3_int(const int v1[3], const int v2[3]) ATTR_WARN_UNUSED_RESULT;
 MINLINE bool equals_v4v4_int(const int v1[4], const int v2[4]) ATTR_WARN_UNUSED_RESULT;
 
 MINLINE bool compare_v2v2(const float a[2],
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index d3c975e3249..305cdf093bf 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -1313,6 +1313,11 @@ MINLINE bool equals_v2v2_int(const int v1[2], const int v2[2])
   return ((v1[0] == v2[0]) && (v1[1] == v2[1]));
 }
 
+MINLINE bool equals_v3v3_int(const int v1[3], const int v2[3])
+{
+  return ((v1[0] == v2[0]) && (v1[1] == v2[1]) && (v1[2] == v2[2]));
+}
+
 MINLINE bool equals_v4v4_int(const int v1[4], const int v2[4])
 {
   return ((v1[0] == v2[0]) && (v1[1] == v2[1]) && (v1[2] == v2[2]) && (v1[3] == v2[3]));



More information about the Bf-blender-cvs mailing list