core_func_vector_relational Module Reference
Relational and equality operators (<, <=, >, >=, ==, !=) are defined to operate on scalars and produce scalar Boolean results. For vector results, use the following builtin functions.
In all cases, the sizes of all the input and return vectors for any particular call must match.
Include < glm/vector_relational.hpp > to use these core features.
Public Member Functions

GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q >lessThan (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the componentwise comparison result of x < y.
L
An integer between 1 and 4 included that qualify the dimension of the vector.
TA floatingpoint or integer scalar type.
 See Also
 See Also
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions

GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q >lessThanEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the componentwise comparison of result x <= y.
L
An integer between 1 and 4 included that qualify the dimension of the vector.
TA floatingpoint or integer scalar type.
 See Also
 See Also
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions

GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q >greaterThan (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the componentwise comparison of result x > y.
L
An integer between 1 and 4 included that qualify the dimension of the vector.
TA floatingpoint or integer scalar type.
 See Also
 See Also
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions

GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q >greaterThanEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the componentwise comparison of result x >= y.
L
An integer between 1 and 4 included that qualify the dimension of the vector.
TA floatingpoint or integer scalar type.
 See Also
 See Also
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions

GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q >equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the componentwise comparison of result x == y.
L
An integer between 1 and 4 included that qualify the dimension of the vector.
TA floatingpoint, integer or bool scalar type.
 See Also
 See Also
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions

GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q >notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the componentwise comparison of result x != y.
L
An integer between 1 and 4 included that qualify the dimension of the vector.
TA floatingpoint, integer or bool scalar type.
 See Also
 See Also
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions

GLM_FUNC_DECL GLM_CONSTEXPR boolany (vec< L, bool, Q > const &v)
Returns true if any component of x is true.
L
An integer between 1 and 4 included that qualify the dimension of the vector.
 See Also
 See Also
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions

GLM_FUNC_DECL GLM_CONSTEXPR boolall (vec< L, bool, Q > const &v)
Returns true if all components of x are true.
L
An integer between 1 and 4 included that qualify the dimension of the vector.
 See Also
 See Also
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions

GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q >not_ (vec< L, bool, Q > const &v)
Returns the componentwise logical complement of x. /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
L
An integer between 1 and 4 included that qualify the dimension of the vector.
 See Also
 See Also
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions