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:
Diffstat (limited to 'intern/cycles/util/util_math_int3.h')
-rw-r--r--intern/cycles/util/util_math_int3.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/intern/cycles/util/util_math_int3.h b/intern/cycles/util/util_math_int3.h
index fa7a02636de..1bc6ca7f376 100644
--- a/intern/cycles/util/util_math_int3.h
+++ b/intern/cycles/util/util_math_int3.h
@@ -78,6 +78,22 @@ ccl_device_inline int3 clamp(const int3& a, int3& mn, int mx)
}
#endif /* !__KERNEL_OPENCL__ */
+
+ccl_device_inline bool operator==(const int3 &a, const int3 &b)
+{
+ return a.x == b.x && a.y == b.y && a.z == b.z;
+}
+
+ccl_device_inline bool operator!=(const int3 &a, const int3 &b)
+{
+ return !(a == b);
+}
+
+ccl_device_inline bool operator<(const int3 &a, const int3 &b)
+{
+ return a.x < b.x && a.y < b.y && a.z < b.z;
+}
+
CCL_NAMESPACE_END
#endif /* __UTIL_MATH_INT3_H__ */