Vector Relational Functions
GLM Core

## Functions

template<template< typename > class vecType>
bool all (vecType< bool > const &v)

template<template< typename > class vecType>
bool any (vecType< bool > const &v)

template<typename vecType >
vecType::bool_type equal (vecType const &x, vecType const &y)

template<typename vecType >
vecType::bool_type greaterThan (vecType const &x, vecType const &y)

template<typename vecType >
vecType::bool_type greaterThanEqual (vecType const &x, vecType const &y)

template<typename vecType >
vecType::bool_type lessThan (vecType const &x, vecType const &y)

template<typename vecType >
vecType::bool_type lessThanEqual (vecType const &x, vecType const &y)

template<template< typename > class vecType>
vecType< bool > not_ (vecType< bool > const &v)

template<typename vecType >
vecType::bool_type notEqual (vecType const &x, vecType const &y)

## Detailed Description

Relational and equality operators (<, <=, >, >=, ==, !=) are defined to operate on scalars and produce scalar Boolean results.

For vector results, use the following built-in functions.

In all cases, the sizes of all the input and return vectors for any particular call must match.

## Function Documentation

 bool glm::all ( vecType< bool > const & v )

Returns true if all components of x are true.

Template Parameters
 vecType Boolean vector types.
GLSL all man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
 bool glm::any ( vecType< bool > const & v )

Returns true if any component of x is true.

Template Parameters
 vecType Boolean vector types.
GLSL any man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
 vecType::bool_type glm::equal ( vecType const & x, vecType const & y )

Returns the component-wise comparison of result x == y.

Template Parameters
 vecType Floating-point, integer or boolean vector types.
GLSL equal man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
 vecType::bool_type glm::greaterThan ( vecType const & x, vecType const & y )

Returns the component-wise comparison of result x > y.

Template Parameters
 vecType Floating-point or integer vector types.
GLSL greaterThan man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
 vecType::bool_type glm::greaterThanEqual ( vecType const & x, vecType const & y )

Returns the component-wise comparison of result x >= y.

Template Parameters
 vecType Floating-point or integer vector types.
GLSL greaterThanEqual man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
 vecType::bool_type glm::lessThan ( vecType const & x, vecType const & y )

Returns the component-wise comparison result of x < y.

Template Parameters
 vecType Floating-point or integer vector types.
GLSL lessThan man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
 vecType::bool_type glm::lessThanEqual ( vecType const & x, vecType const & y )

Returns the component-wise comparison of result x <= y.

Template Parameters
 vecType Floating-point or integer vector types.
GLSL lessThanEqual man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
 vecType glm::not_ ( vecType< bool > const & v )

Returns the component-wise logical complement of x.

/!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.

Template Parameters
 vecType Boolean vector types.