diff --git a/glm/core/type_mat2x2.inl b/glm/core/type_mat2x2.inl index 33673c0f..6ab1260c 100644 --- a/glm/core/type_mat2x2.inl +++ b/glm/core/type_mat2x2.inl @@ -583,5 +583,28 @@ namespace detail m[1] - T(1)); } + ////////////////////////////////////// + // Boolean operators + + template + inline bool operator== + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]); + } + + template + inline bool operator!= + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]); + } + } //namespace detail } //namespace glm diff --git a/glm/core/type_mat2x3.inl b/glm/core/type_mat2x3.inl index 1b2f3a3f..aa8a58a4 100644 --- a/glm/core/type_mat2x3.inl +++ b/glm/core/type_mat2x3.inl @@ -514,5 +514,28 @@ namespace detail m[1] - typename tmat2x3::value_type(1)); } + ////////////////////////////////////// + // Boolean operators + + template + inline bool operator== + ( + tmat2x3 const & m1, + tmat2x3 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]); + } + + template + inline bool operator!= + ( + tmat2x3 const & m1, + tmat2x3 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]); + } + } //namespace detail } //namespace glm diff --git a/glm/core/type_mat2x4.inl b/glm/core/type_mat2x4.inl index 007aae74..98b7069e 100644 --- a/glm/core/type_mat2x4.inl +++ b/glm/core/type_mat2x4.inl @@ -542,5 +542,28 @@ namespace detail m[1] - typename tmat2x4::value_type(1)); } + ////////////////////////////////////// + // Boolean operators + + template + inline bool operator== + ( + tmat2x4 const & m1, + tmat2x4 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]); + } + + template + inline bool operator!= + ( + tmat2x4 const & m1, + tmat2x4 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]); + } + } //namespace detail } //namespace glm diff --git a/glm/core/type_mat3x2.inl b/glm/core/type_mat3x2.inl index 3f2d3b05..4ac61ff4 100644 --- a/glm/core/type_mat3x2.inl +++ b/glm/core/type_mat3x2.inl @@ -548,5 +548,28 @@ namespace detail m[2] - One); } + ////////////////////////////////////// + // Boolean operators + + template + inline bool operator== + ( + tmat3x2 const & m1, + tmat3x2 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); + } + + template + inline bool operator!= + ( + tmat3x2 const & m1, + tmat3x2 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); + } + } //namespace detail } //namespace glm diff --git a/glm/core/type_mat3x3.inl b/glm/core/type_mat3x3.inl index b99ab3c6..1fdc3f63 100644 --- a/glm/core/type_mat3x3.inl +++ b/glm/core/type_mat3x3.inl @@ -677,5 +677,28 @@ namespace detail m[2] - T(1)); } + ////////////////////////////////////// + // Boolean operators + + template + inline bool operator== + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); + } + + template + inline bool operator!= + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); + } + } //namespace detail } //namespace glm diff --git a/glm/core/type_mat3x4.inl b/glm/core/type_mat3x4.inl index 6fd8f2c8..f2ef904d 100644 --- a/glm/core/type_mat3x4.inl +++ b/glm/core/type_mat3x4.inl @@ -582,5 +582,28 @@ namespace detail m[2] - T(1)); } + ////////////////////////////////////// + // Boolean operators + + template + inline bool operator== + ( + tmat3x4 const & m1, + tmat3x4 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); + } + + template + inline bool operator!= + ( + tmat3x4 const & m1, + tmat3x4 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); + } + } //namespace detail } //namespace glm diff --git a/glm/core/type_mat4x2.inl b/glm/core/type_mat4x2.inl index 232675b8..7f6ed80a 100644 --- a/glm/core/type_mat4x2.inl +++ b/glm/core/type_mat4x2.inl @@ -591,5 +591,28 @@ namespace detail m[3] - typename tmat4x2::value_type(1)); } + ////////////////////////////////////// + // Boolean operators + + template + inline bool operator== + ( + tmat4x2 const & m1, + tmat4x2 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); + } + + template + inline bool operator!= + ( + tmat4x2 const & m1, + tmat4x2 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); + } + } //namespace detail } //namespace glm diff --git a/glm/core/type_mat4x3.inl b/glm/core/type_mat4x3.inl index c66ccbec..080dbd8e 100644 --- a/glm/core/type_mat4x3.inl +++ b/glm/core/type_mat4x3.inl @@ -595,6 +595,29 @@ namespace detail m[3] - T(1)); } + ////////////////////////////////////// + // Boolean operators + + template + inline bool operator== + ( + tmat4x3 const & m1, + tmat4x3 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); + } + + template + inline bool operator!= + ( + tmat4x3 const & m1, + tmat4x3 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); + } + } //namespace detail } //namespace glm diff --git a/glm/core/type_mat4x4.inl b/glm/core/type_mat4x4.inl index a344952d..a307d9e8 100644 --- a/glm/core/type_mat4x4.inl +++ b/glm/core/type_mat4x4.inl @@ -732,5 +732,28 @@ namespace detail m[3] - typename tmat4x4::value_type(1)); } + ////////////////////////////////////// + // Boolean operators + + template + inline bool operator== + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); + } + + template + inline bool operator!= + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); + } + } //namespace detail } //namespace glm