master
ブランチ master
VulkanExample / dep / include / glm / gtx / extended_min_max.hpp
3.6 KB、135行 生 Blame 履歴
1/// @ref gtx_extended_min_max
2/// @file glm/gtx/extended_min_max.hpp
3///
4/// @see core (dependence)
5///
6/// @defgroup gtx_extended_min_max GLM_GTX_extended_min_max
7/// @ingroup gtx
8///
9/// Include <glm/gtx/extended_min_max.hpp> to use the features of this extension.
10///
11/// Min and max functions for 3 to 4 parameters.
12
13#pragma once
14
15// Dependency:
16#include "../glm.hpp"
17#include "../ext/vector_common.hpp"
18
19#ifndef GLM_ENABLE_EXPERIMENTAL
20# error "GLM: GLM_GTX_extended_min_max is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
22# pragma message("GLM: GLM_GTX_extended_min_max extension included")
23#endif
24
25namespace glm
26{
27 /// @addtogroup gtx_extended_min_max
28 /// @{
29
30 /// Return the minimum component-wise values of 3 inputs
31 /// @see gtx_extented_min_max
32 template<typename T>
33 GLM_FUNC_DECL T min(
34 T const& x,
35 T const& y,
36 T const& z);
37
38 /// Return the minimum component-wise values of 3 inputs
39 /// @see gtx_extented_min_max
40 template<typename T, template<typename> class C>
41 GLM_FUNC_DECL C<T> min(
42 C<T> const& x,
43 typename C<T>::T const& y,
44 typename C<T>::T const& z);
45
46 /// Return the minimum component-wise values of 3 inputs
47 /// @see gtx_extented_min_max
48 template<typename T, template<typename> class C>
49 GLM_FUNC_DECL C<T> min(
50 C<T> const& x,
51 C<T> const& y,
52 C<T> const& z);
53
54 /// Return the minimum component-wise values of 4 inputs
55 /// @see gtx_extented_min_max
56 template<typename T>
57 GLM_FUNC_DECL T min(
58 T const& x,
59 T const& y,
60 T const& z,
61 T const& w);
62
63 /// Return the minimum component-wise values of 4 inputs
64 /// @see gtx_extented_min_max
65 template<typename T, template<typename> class C>
66 GLM_FUNC_DECL C<T> min(
67 C<T> const& x,
68 typename C<T>::T const& y,
69 typename C<T>::T const& z,
70 typename C<T>::T const& w);
71
72 /// Return the minimum component-wise values of 4 inputs
73 /// @see gtx_extented_min_max
74 template<typename T, template<typename> class C>
75 GLM_FUNC_DECL C<T> min(
76 C<T> const& x,
77 C<T> const& y,
78 C<T> const& z,
79 C<T> const& w);
80
81 /// Return the maximum component-wise values of 3 inputs
82 /// @see gtx_extented_min_max
83 template<typename T>
84 GLM_FUNC_DECL T max(
85 T const& x,
86 T const& y,
87 T const& z);
88
89 /// Return the maximum component-wise values of 3 inputs
90 /// @see gtx_extented_min_max
91 template<typename T, template<typename> class C>
92 GLM_FUNC_DECL C<T> max(
93 C<T> const& x,
94 typename C<T>::T const& y,
95 typename C<T>::T const& z);
96
97 /// Return the maximum component-wise values of 3 inputs
98 /// @see gtx_extented_min_max
99 template<typename T, template<typename> class C>
100 GLM_FUNC_DECL C<T> max(
101 C<T> const& x,
102 C<T> const& y,
103 C<T> const& z);
104
105 /// Return the maximum component-wise values of 4 inputs
106 /// @see gtx_extented_min_max
107 template<typename T>
108 GLM_FUNC_DECL T max(
109 T const& x,
110 T const& y,
111 T const& z,
112 T const& w);
113
114 /// Return the maximum component-wise values of 4 inputs
115 /// @see gtx_extented_min_max
116 template<typename T, template<typename> class C>
117 GLM_FUNC_DECL C<T> max(
118 C<T> const& x,
119 typename C<T>::T const& y,
120 typename C<T>::T const& z,
121 typename C<T>::T const& w);
122
123 /// Return the maximum component-wise values of 4 inputs
124 /// @see gtx_extented_min_max
125 template<typename T, template<typename> class C>
126 GLM_FUNC_DECL C<T> max(
127 C<T> const& x,
128 C<T> const& y,
129 C<T> const& z,
130 C<T> const& w);
131
132 /// @}
133}//namespace glm
134
135#include "extended_min_max.inl"