Home | History | Annotate | Download | only in gtx
      1 ///////////////////////////////////////////////////////////////////////////////////////////////////
      2 // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
      3 ///////////////////////////////////////////////////////////////////////////////////////////////////
      4 // Created : 2013-02-04
      5 // Updated : 2013-02-04
      6 // Licence : This source is under MIT License
      7 // File    : glm/gtx/scalar_relational.inl
      8 ///////////////////////////////////////////////////////////////////////////////////////////////////
      9 
     10 namespace glm
     11 {
     12 	template <typename T>
     13 	GLM_FUNC_QUALIFIER bool lessThan
     14 	(
     15 		T const & x, 
     16 		T const & y
     17 	)
     18 	{
     19 		return x < y;
     20 	}
     21 
     22 	template <typename T>
     23 	GLM_FUNC_QUALIFIER bool lessThanEqual
     24 	(
     25 		T const & x, 
     26 		T const & y
     27 	)
     28 	{
     29 		return x <= y;
     30 	}
     31 
     32 	template <typename T>
     33 	GLM_FUNC_QUALIFIER bool greaterThan
     34 	(
     35 		T const & x, 
     36 		T const & y
     37 	)
     38 	{
     39 		return x > y;
     40 	}
     41 
     42 	template <typename T>
     43 	GLM_FUNC_QUALIFIER bool greaterThanEqual
     44 	(
     45 		T const & x, 
     46 		T const & y
     47 	)
     48 	{
     49 		return x >= y;
     50 	}
     51 
     52 	template <typename T>
     53 	GLM_FUNC_QUALIFIER bool equal
     54 	(
     55 		T const & x, 
     56 		T const & y
     57 	)
     58 	{
     59 		return x == y;
     60 	}
     61 
     62 	template <typename T>
     63 	GLM_FUNC_QUALIFIER bool notEqual
     64 	(
     65 		T const & x, 
     66 		T const & y
     67 	)
     68 	{
     69 		return x != y;
     70 	}
     71 
     72 	GLM_FUNC_QUALIFIER bool any
     73 	(
     74 		bool const & x
     75 	)
     76 	{
     77 		return x;
     78 	}
     79 
     80 	GLM_FUNC_QUALIFIER bool all
     81 	(
     82 		bool const & x
     83 	)
     84 	{
     85 		return x;
     86 	}
     87 
     88 	GLM_FUNC_QUALIFIER bool not_
     89 	(
     90 		bool const & x
     91 	)
     92 	{
     93 		return !x;
     94 	}
     95 }//namespace glm
     96