| 1 | /// @ref ext_scalar_relational |
| 2 | /// @file glm/ext/scalar_relational.hpp |
| 3 | /// |
| 4 | /// @defgroup ext_scalar_relational GLM_EXT_scalar_relational |
| 5 | /// @ingroup ext |
| 6 | /// |
| 7 | /// Exposes comparison functions for scalar types that take a user defined epsilon values. |
| 8 | /// |
| 9 | /// Include <glm/ext/scalar_relational.hpp> to use the features of this extension. |
| 10 | /// |
| 11 | /// @see core_vector_relational |
| 12 | /// @see ext_vector_relational |
| 13 | /// @see ext_matrix_relational |
| 14 | |
| 15 | #pragma once |
| 16 | |
| 17 | // Dependencies |
| 18 | #include "../detail/qualifier.hpp" |
| 19 | |
| 20 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) |
| 21 | # pragma message("GLM: GLM_EXT_scalar_relational extension included") |
| 22 | #endif |
| 23 | |
| 24 | namespace glm |
| 25 | { |
| 26 | /// Returns the component-wise comparison of |x - y| < epsilon. |
| 27 | /// True if this expression is satisfied. |
| 28 | /// |
| 29 | /// @tparam genType Floating-point or integer scalar types |
| 30 | template<typename genType> |
| 31 | GLM_FUNC_DECL GLM_CONSTEXPR bool equal(genType const& x, genType const& y, genType const& epsilon); |
| 32 | |
| 33 | /// Returns the component-wise comparison of |x - y| >= epsilon. |
| 34 | /// True if this expression is not satisfied. |
| 35 | /// |
| 36 | /// @tparam genType Floating-point or integer scalar types |
| 37 | template<typename genType> |
| 38 | GLM_FUNC_DECL GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, genType const& epsilon); |
| 39 | |
| 40 | /// @} |
| 41 | }//namespace glm |
| 42 | |
| 43 | #include "scalar_relational.inl" |