1b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///////////////////////////////////////////////////////////////////////////////////
2b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// OpenGL Mathematics (glm.g-truc.net)
3b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
4b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
5b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// Permission is hereby granted, free of charge, to any person obtaining a copy
6b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// of this software and associated documentation files (the "Software"), to deal
7b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// in the Software without restriction, including without limitation the rights
8b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// copies of the Software, and to permit persons to whom the Software is
10b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// furnished to do so, subject to the following conditions:
11b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
12b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// The above copyright notice and this permission notice shall be included in
13b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// all copies or substantial portions of the Software.
14b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
15b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// THE SOFTWARE.
22b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
23b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @ref gtc_epsilon
24b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @file glm/gtc/epsilon.hpp
25b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @date 2012-04-07 / 2012-04-07
26b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @author Christophe Riccio
27b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
28b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @see core (dependence)
29b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @see gtc_half_float (dependence)
30b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @see gtc_quaternion (dependence)
31b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
32b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @defgroup gtc_epsilon GLM_GTC_epsilon
33b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @ingroup gtc
34b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
35b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @brief Comparison functions for a user defined epsilon values.
36b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
37b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// <glm/gtc/epsilon.hpp> need to be included to use these functionalities.
38b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///////////////////////////////////////////////////////////////////////////////////
39b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
40b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#ifndef GLM_GTC_epsilon
41b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#define GLM_GTC_epsilon
42b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
43b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG// Dependencies
44b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#include "../detail/setup.hpp"
45b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#include "../detail/precision.hpp"
46b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
47b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#	pragma message("GLM: GLM_GTC_epsilon extension included")
49b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#endif
50b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
51b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarGnamespace glm
52b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG{
53b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// @addtogroup gtc_epsilon
54b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// @{
55b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
56b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// Returns the component-wise comparison of |x - y| < epsilon.
57b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// True if this expression is satisfied.
58b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	///
59b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// @see gtc_epsilon
60b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	template <typename T, precision P, template <typename, precision> class vecType>
61b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	GLM_FUNC_DECL vecType<bool, P> epsilonEqual(
62b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		vecType<T, P> const & x,
63b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		vecType<T, P> const & y,
64b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		T const & epsilon);
65b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
66b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// Returns the component-wise comparison of |x - y| < epsilon.
67b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// True if this expression is satisfied.
68b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	///
69b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// @see gtc_epsilon
70b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	template <typename genType>
71b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	GLM_FUNC_DECL bool epsilonEqual(
72b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		genType const & x,
73b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		genType const & y,
74b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		genType const & epsilon);
75b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
76b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// Returns the component-wise comparison of |x - y| < epsilon.
77b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// True if this expression is not satisfied.
78b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	///
79b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// @see gtc_epsilon
80b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	template <typename genType>
81b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	GLM_FUNC_DECL typename genType::boolType epsilonNotEqual(
82b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		genType const & x,
83b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		genType const & y,
84b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		typename genType::value_type const & epsilon);
85b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
86b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// Returns the component-wise comparison of |x - y| >= epsilon.
87b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// True if this expression is not satisfied.
88b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	///
89b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// @see gtc_epsilon
90b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	template <typename genType>
91b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	GLM_FUNC_DECL bool epsilonNotEqual(
92b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		genType const & x,
93b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		genType const & y,
94b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		genType const & epsilon);
95b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
96b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// @}
97b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG}//namespace glm
98b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
99b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#include "epsilon.inl"
100b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
101b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#endif//GLM_GTC_epsilon
102