29 #ifndef glm_core_type_gentype1
30 #define glm_core_type_gentype1
33 #include "type_vec.hpp"
35 # if GLM_HAS_ANONYMOUS_UNION
36 # include "_swizzle.hpp"
38 # include "_swizzle_func.hpp"
41 #if(GLM_HAS_INITIALIZER_LISTS)
42 # include <initializer_list>
43 #endif //GLM_HAS_INITIALIZER_LISTS
49 template <
typename T, precision P>
57 typedef tvec1<T, P> type;
58 typedef tvec1<bool, P> bool_type;
64 GLM_FUNC_DECL GLM_CONSTEXPR length_t
length()
const;
74 GLM_FUNC_DECL T & operator[](length_t i);
75 GLM_FUNC_DECL T
const & operator[](length_t i)
const;
80 GLM_FUNC_DECL tvec1();
81 GLM_FUNC_DECL tvec1(tvec1<T, P>
const & v);
82 template <precision Q>
83 GLM_FUNC_DECL tvec1(tvec1<T, Q>
const & v);
85 #if(GLM_HAS_INITIALIZER_LISTS)
87 GLM_FUNC_DECL tvec1(std::initializer_list<U>
const & v);
88 #endif//GLM_HAS_INITIALIZER_LISTS
93 GLM_FUNC_DECL
explicit tvec1(
95 GLM_FUNC_DECL
explicit tvec1(
107 template <
typename U>
108 GLM_FUNC_DECL
explicit tvec1(U
const & s);
114 template <
typename U, precision Q>
115 GLM_FUNC_DECL
explicit tvec1(tvec1<U, Q>
const & v);
117 template <
typename U, precision Q>
118 GLM_FUNC_DECL
explicit tvec1(tvec2<U, Q>
const & v);
120 template <
typename U, precision Q>
121 GLM_FUNC_DECL
explicit tvec1(tvec3<U, Q>
const & v);
123 template <
typename U, precision Q>
124 GLM_FUNC_DECL
explicit tvec1(tvec4<U, Q>
const & v);
129 GLM_FUNC_DECL tvec1<T, P> & operator= (tvec1<T, P>
const & v);
130 template <
typename U>
131 GLM_FUNC_DECL tvec1<T, P> & operator= (tvec1<U, P>
const & v);
133 template <
typename U>
134 GLM_FUNC_DECL tvec1<T, P> & operator+=(U
const & s);
135 template <
typename U>
136 GLM_FUNC_DECL tvec1<T, P> & operator+=(tvec1<U, P>
const & v);
137 template <
typename U>
138 GLM_FUNC_DECL tvec1<T, P> & operator-=(U
const & s);
139 template <
typename U>
140 GLM_FUNC_DECL tvec1<T, P> & operator-=(tvec1<U, P>
const & v);
141 template <
typename U>
142 GLM_FUNC_DECL tvec1<T, P> & operator*=(U
const & s);
143 template <
typename U>
144 GLM_FUNC_DECL tvec1<T, P> & operator*=(tvec1<U, P>
const & v);
145 template <
typename U>
146 GLM_FUNC_DECL tvec1<T, P> & operator/=(U
const & s);
147 template <
typename U>
148 GLM_FUNC_DECL tvec1<T, P> & operator/=(tvec1<U, P>
const & v);
153 GLM_FUNC_DECL tvec1<T, P> & operator++();
154 GLM_FUNC_DECL tvec1<T, P> & operator--();
155 GLM_FUNC_DECL tvec1<T, P> operator++(
int);
156 GLM_FUNC_DECL tvec1<T, P> operator--(
int);
161 template <
typename U>
162 GLM_FUNC_DECL tvec1<T, P> & operator%=(U
const & s);
163 template <
typename U>
164 GLM_FUNC_DECL tvec1<T, P> & operator%=(tvec1<U, P>
const & v);
165 template <
typename U>
166 GLM_FUNC_DECL tvec1<T, P> & operator&=(U
const & s);
167 template <
typename U>
168 GLM_FUNC_DECL tvec1<T, P> & operator&=(tvec1<U, P>
const & v);
169 template <
typename U>
170 GLM_FUNC_DECL tvec1<T, P> & operator|=(U
const & s);
171 template <
typename U>
172 GLM_FUNC_DECL tvec1<T, P> & operator|=(tvec1<U, P>
const & v);
173 template <
typename U>
174 GLM_FUNC_DECL tvec1<T, P> & operator^=(U
const & s);
175 template <
typename U>
176 GLM_FUNC_DECL tvec1<T, P> & operator^=(tvec1<U, P>
const & v);
177 template <
typename U>
178 GLM_FUNC_DECL tvec1<T, P> & operator<<=(U
const & s);
179 template <
typename U>
180 GLM_FUNC_DECL tvec1<T, P> & operator<<=(tvec1<U, P>
const & v);
181 template <
typename U>
182 GLM_FUNC_DECL tvec1<T, P> & operator>>=(U
const & s);
183 template <
typename U>
184 GLM_FUNC_DECL tvec1<T, P> & operator>>=(tvec1<U, P>
const & v);
187 GLM_DETAIL_IS_VECTOR(tvec1);
192 #ifndef GLM_EXTERNAL_TEMPLATE
193 #include "type_vec1.inl"
194 #endif//GLM_EXTERNAL_TEMPLATE
196 #endif//glm_core_type_gentype1
GLM_FUNC_DECL genType::value_type length(genType const &x)
Returns the length of x, i.e., sqrt(x * x).