9
3

scalar_relational.inl 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /// @ref gtx_scalar_relational
  2. namespace glm
  3. {
  4. template<typename T>
  5. GLM_FUNC_QUALIFIER bool lessThan
  6. (
  7. T const& x,
  8. T const& y
  9. )
  10. {
  11. return x < y;
  12. }
  13. template<typename T>
  14. GLM_FUNC_QUALIFIER bool lessThanEqual
  15. (
  16. T const& x,
  17. T const& y
  18. )
  19. {
  20. return x <= y;
  21. }
  22. template<typename T>
  23. GLM_FUNC_QUALIFIER bool greaterThan
  24. (
  25. T const& x,
  26. T const& y
  27. )
  28. {
  29. return x > y;
  30. }
  31. template<typename T>
  32. GLM_FUNC_QUALIFIER bool greaterThanEqual
  33. (
  34. T const& x,
  35. T const& y
  36. )
  37. {
  38. return x >= y;
  39. }
  40. template<typename T>
  41. GLM_FUNC_QUALIFIER bool equal
  42. (
  43. T const& x,
  44. T const& y
  45. )
  46. {
  47. return detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(x, y);
  48. }
  49. template<typename T>
  50. GLM_FUNC_QUALIFIER bool notEqual
  51. (
  52. T const& x,
  53. T const& y
  54. )
  55. {
  56. return !detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(x, y);
  57. }
  58. GLM_FUNC_QUALIFIER bool any
  59. (
  60. bool const& x
  61. )
  62. {
  63. return x;
  64. }
  65. GLM_FUNC_QUALIFIER bool all
  66. (
  67. bool const& x
  68. )
  69. {
  70. return x;
  71. }
  72. GLM_FUNC_QUALIFIER bool not_
  73. (
  74. bool const& x
  75. )
  76. {
  77. return !x;
  78. }
  79. }//namespace glm