29 #ifndef glm_core_type_gentype2 
   30 #define glm_core_type_gentype2 
   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 tvec2<T, P> type;
 
   58                 typedef tvec2<bool, P> bool_type;
 
   60                 typedef int size_type;
 
   65                 GLM_FUNC_DECL GLM_CONSTEXPR length_t 
length() 
const;
 
   70 #               if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)) 
   77                                 _GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, x, y)
 
   78                                 _GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, r, g)
 
   79                                 _GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, s, t)
 
   80                                 _GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, x, y)
 
   81                                 _GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, r, g)
 
   82                                 _GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, s, t)
 
   83                                 _GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, x, y)
 
   84                                 _GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, r, g)
 
   85                                 _GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, s, t)
 
   92                                 GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4)
 
   99                 GLM_FUNC_DECL T & operator[](length_t i);
 
  100                 GLM_FUNC_DECL T 
const & operator[](length_t i) 
const;
 
  105                 GLM_FUNC_DECL tvec2();
 
  106                 GLM_FUNC_DECL tvec2(tvec2<T, P> 
const & v);
 
  107                 template <precision Q>
 
  108                 GLM_FUNC_DECL tvec2(tvec2<T, Q> 
const & v);
 
  110 #if(GLM_HAS_INITIALIZER_LISTS) 
  111                 template <
typename U>
 
  112                 GLM_FUNC_DECL tvec2(std::initializer_list<U> 
const & v);
 
  113 #endif//GLM_HAS_INITIALIZER_LISTS 
  118                 GLM_FUNC_DECL 
explicit tvec2(
 
  120                 GLM_FUNC_DECL 
explicit tvec2(
 
  122                 GLM_FUNC_DECL 
explicit tvec2(
 
  129 #               if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)) 
  130                 template <
int E0, 
int E1>
 
  131                 GLM_FUNC_DECL tvec2(_swizzle<2,T, P, tvec2<T, P>, E0, E1,-1,-2> 
const & that)
 
  135 #               endif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)) 
  141                 template <
typename U, 
typename V>
 
  142                 GLM_FUNC_DECL 
explicit tvec2(
 
  150                 template <
typename U, precision Q>
 
  151                 GLM_FUNC_DECL 
explicit tvec2(tvec2<U, Q> 
const & v);
 
  153                 template <
typename U, precision Q>
 
  154                 GLM_FUNC_DECL 
explicit tvec2(tvec3<U, Q> 
const & v);
 
  156                 template <
typename U, precision Q>
 
  157                 GLM_FUNC_DECL 
explicit tvec2(tvec4<U, Q> 
const & v);
 
  162                 GLM_FUNC_DECL tvec2<T, P> & operator= (tvec2<T, P> 
const & v);
 
  163                 template <
typename U> 
 
  164                 GLM_FUNC_DECL tvec2<T, P> & operator= (tvec2<U, P> 
const & v);
 
  166                 template <
typename U> 
 
  167                 GLM_FUNC_DECL tvec2<T, P> & operator+=(U s);
 
  168                 template <
typename U> 
 
  169                 GLM_FUNC_DECL tvec2<T, P> & operator+=(tvec2<U, P> 
const & v);
 
  170                 template <
typename U> 
 
  171                 GLM_FUNC_DECL tvec2<T, P> & operator-=(U s);
 
  172                 template <
typename U> 
 
  173                 GLM_FUNC_DECL tvec2<T, P> & operator-=(tvec2<U, P> 
const & v);
 
  174                 template <
typename U> 
 
  175                 GLM_FUNC_DECL tvec2<T, P> & operator*=(U s);
 
  176                 template <
typename U> 
 
  177                 GLM_FUNC_DECL tvec2<T, P> & operator*=(tvec2<U, P> 
const & v);
 
  178                 template <
typename U> 
 
  179                 GLM_FUNC_DECL tvec2<T, P> & operator/=(U s);
 
  180                 template <
typename U> 
 
  181                 GLM_FUNC_DECL tvec2<T, P> & operator/=(tvec2<U, P> 
const & v);
 
  186                 GLM_FUNC_DECL tvec2<T, P> & operator++();
 
  187                 GLM_FUNC_DECL tvec2<T, P> & operator--();
 
  188                 GLM_FUNC_DECL tvec2<T, P> operator++(
int);
 
  189                 GLM_FUNC_DECL tvec2<T, P> operator--(
int);
 
  194                 template <
typename U> 
 
  195                 GLM_FUNC_DECL tvec2<T, P> & operator%= (U s);
 
  196                 template <
typename U> 
 
  197                 GLM_FUNC_DECL tvec2<T, P> & operator%= (tvec2<U, P> 
const & v);
 
  198                 template <
typename U> 
 
  199                 GLM_FUNC_DECL tvec2<T, P> & operator&= (U s);
 
  200                 template <
typename U> 
 
  201                 GLM_FUNC_DECL tvec2<T, P> & operator&= (tvec2<U, P> 
const & v);
 
  202                 template <
typename U> 
 
  203                 GLM_FUNC_DECL tvec2<T, P> & operator|= (U s);
 
  204                 template <
typename U> 
 
  205                 GLM_FUNC_DECL tvec2<T, P> & operator|= (tvec2<U, P> 
const & v);
 
  206                 template <
typename U> 
 
  207                 GLM_FUNC_DECL tvec2<T, P> & operator^= (U s);
 
  208                 template <
typename U> 
 
  209                 GLM_FUNC_DECL tvec2<T, P> & operator^= (tvec2<U, P> 
const & v);
 
  210                 template <
typename U> 
 
  211                 GLM_FUNC_DECL tvec2<T, P> & operator<<=(U s);
 
  212                 template <
typename U> 
 
  213                 GLM_FUNC_DECL tvec2<T, P> & operator<<=(tvec2<U, P> 
const & v);
 
  214                 template <
typename U> 
 
  215                 GLM_FUNC_DECL tvec2<T, P> & operator>>=(U s);
 
  216                 template <
typename U> 
 
  217                 GLM_FUNC_DECL tvec2<T, P> & operator>>=(tvec2<U, P> 
const & v);
 
  220         template <
typename T, precision P>
 
  221         GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> 
const & v, T 
const & s);
 
  223         template <
typename T, precision P>
 
  224         GLM_FUNC_DECL tvec2<T, P> operator+(T 
const & s, tvec2<T, P> 
const & v);
 
  226         template <
typename T, precision P>
 
  227         GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> 
const & v1, tvec2<T, P> 
const & v2);
 
  229         template <
typename T, precision P>
 
  230         GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> 
const & v, T 
const & s);
 
  232         template <
typename T, precision P>
 
  233         GLM_FUNC_DECL tvec2<T, P> operator-(T 
const & s, tvec2<T, P> 
const & v);
 
  235         template <
typename T, precision P>
 
  236         GLM_FUNC_DECL tvec2<T, P> operator-     (tvec2<T, P> 
const & v1, tvec2<T, P> 
const & v2);
 
  238         template <
typename T, precision P>
 
  239         GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> 
const & v, T 
const & s);
 
  241         template <
typename T, precision P>
 
  242         GLM_FUNC_DECL tvec2<T, P> operator*(T 
const & s, tvec2<T, P> 
const & v);
 
  244         template <
typename T, precision P>
 
  245         GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> 
const & v1, tvec2<T, P> 
const & v2);
 
  247         template <
typename T, precision P>
 
  248         GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> 
const & v, T 
const & s);
 
  250         template <
typename T, precision P>
 
  251         GLM_FUNC_DECL tvec2<T, P> operator/(T 
const & s, tvec2<T, P> 
const & v);
 
  253         template <
typename T, precision P>
 
  254         GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> 
const & v1, tvec2<T, P> 
const & v2);
 
  256         template <
typename T, precision P>
 
  257         GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> 
const & v);
 
  259         template <
typename T, precision P>
 
  260         GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> 
const & v, T 
const & s);
 
  262         template <
typename T, precision P>
 
  263         GLM_FUNC_DECL tvec2<T, P> operator%(T 
const & s, tvec2<T, P> 
const & v);
 
  265         template <
typename T, precision P>
 
  266         GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> 
const & v1, tvec2<T, P> 
const & v2);
 
  268         template <
typename T, precision P>
 
  269         GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> 
const & v, T 
const & s);
 
  271         template <
typename T, precision P>
 
  272         GLM_FUNC_DECL tvec2<T, P> operator&(T 
const & s, tvec2<T, P> 
const & v);
 
  274         template <
typename T, precision P>
 
  275         GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> 
const & v1, tvec2<T, P> 
const & v2);
 
  277         template <
typename T, precision P>
 
  278         GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> 
const & v, T 
const & s);
 
  280         template <
typename T, precision P>
 
  281         GLM_FUNC_DECL tvec2<T, P> operator|(T 
const & s, tvec2<T, P> 
const & v);
 
  283         template <
typename T, precision P>
 
  284         GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> 
const & v1, tvec2<T, P> 
const & v2);
 
  286         template <
typename T, precision P>
 
  287         GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> 
const & v, T 
const & s);
 
  289         template <
typename T, precision P>
 
  290         GLM_FUNC_DECL tvec2<T, P> operator^(T 
const & s, tvec2<T, P> 
const & v);
 
  292         template <
typename T, precision P>
 
  293         GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> 
const & v1, tvec2<T, P> 
const & v2);
 
  295         template <
typename T, precision P>
 
  296         GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> 
const & v, T 
const & s);
 
  298         template <
typename T, precision P>
 
  299         GLM_FUNC_DECL tvec2<T, P> operator<<(T const & s, tvec2<T, P> 
const & v);
 
  301         template <
typename T, precision P>
 
  302         GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> 
const & v1, tvec2<T, P> 
const & v2);
 
  304         template <
typename T, precision P>
 
  305         GLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> 
const & v, T 
const & s);
 
  307         template <
typename T, precision P>
 
  308         GLM_FUNC_DECL tvec2<T, P> operator>>(T 
const & s, tvec2<T, P> 
const & v);
 
  310         template <
typename T, precision P>
 
  311         GLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> 
const & v1, tvec2<T, P> 
const & v2);
 
  313         template <
typename T, precision P>
 
  314         GLM_FUNC_DECL tvec2<T, P> operator~(tvec2<T, P> 
const & v);
 
  319 #ifndef GLM_EXTERNAL_TEMPLATE 
  320 #include "type_vec2.inl" 
  321 #endif//GLM_EXTERNAL_TEMPLATE 
  323 #endif//glm_core_type_gentype2 
GLM_FUNC_DECL genType::value_type length(genType const &x)
Returns the length of x, i.e., sqrt(x * x).