1#ifndef NNGN_MATH_VEC4_H
2#define NNGN_MATH_VEC4_H
21 : x{p_x}, y{p_y}, z{p_z},
w{p_w} {}
34 constexpr vec2_base<T> v0 ## v1() const { return {this->v0, this->v1}; }
40#define S(v0, v1, v2) \
41 constexpr vec3_base<T> v0 ## v1 ## v2() const \
42 { return {this->v0, this->v1, this->v2}; }
43 S(x,x,x)
S(x,x,y)
S(x,x,z)
S(x,x,
w)
S(x,y,x)
S(x,y,y)
S(x,y,z)
S(x,y,
w)
44 S(x,z,x)
S(x,z,y)
S(x,z,z)
S(x,z,
w)
S(x,
w,x)
S(x,
w,y)
S(x,
w,z)
S(x,
w,
w)
45 S(y,x,x)
S(y,x,y)
S(y,x,z)
S(y,x,
w)
S(y,y,x)
S(y,y,y)
S(y,y,z)
S(y,y,
w)
46 S(y,z,x)
S(y,z,y)
S(y,z,z)
S(y,z,
w)
S(y,
w,x)
S(y,
w,y)
S(y,
w,z)
S(y,
w,
w)
47 S(z,x,x)
S(z,x,y)
S(z,x,z)
S(z,x,
w)
S(z,y,x)
S(z,y,y)
S(z,y,z)
S(z,y,
w)
48 S(z,z,x)
S(z,z,y)
S(z,z,z)
S(z,z,
w)
S(z,
w,x)
S(z,
w,y)
S(z,
w,z)
S(z,
w,
w)
49 S(
w,x,x)
S(
w,x,y)
S(
w,x,z)
S(
w,x,
w)
S(
w,y,x)
S(
w,y,y)
S(
w,y,z)
S(
w,y,
w)
50 S(
w,z,x)
S(
w,z,y)
S(
w,z,z)
S(
w,z,
w)
S(
w,
w,x)
S(
w,
w,y)
S(
w,
w,z)
S(
w,
w,
w)
52#define S(v0, v1, v2, v3) \
53 constexpr vec4_base<T> v0 ## v1 ## v2 ## v3() const \
54 { return {this->v0, this->v1, this->v2, this->v3}; }
55 S(x,x,x,x)
S(x,x,x,y)
S(x,x,x,z)
S(x,x,x,
w)
56 S(x,x,y,x)
S(x,x,y,y)
S(x,x,y,z)
S(x,x,y,
w)
57 S(x,x,z,x)
S(x,x,z,y)
S(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,
w,
w)
123struct vec_type<
T, 4> : std::type_identity<vec4_base<T>> {};
v[1]
Definition math.lua:22
local w
Definition strict.lua:12
constexpr vec4_base(T p_x, T p_y, T p_z)
Definition vec4.h:18
constexpr vec4_base(T v)
Definition vec4.h:15
constexpr vec4_base(T p_x, const vec2_base< T > &v, T p_w)
Definition vec4.h:24
constexpr vec3_base< T > persp_div() const
Definition vec4.h:32
constexpr vec4_base()=default
constexpr vec4_base(const vec2_base< T > &u, const vec2_base< T > &v)
Definition vec4.h:26
constexpr vec4_base(const vec2_base< T > &v, T p_z, T p_w)
Definition vec4.h:22
constexpr vec4_base(T p_x, T p_y, T p_z, T p_w)
Definition vec4.h:20
constexpr vec4_base(const vec3_base< T > &v, T p_w)
Definition vec4.h:28
constexpr vec4_base(T p_x, const vec3_base< T > &v)
Definition vec4.h:30
constexpr vec4_base(T p_x, T p_y)
Definition vec4.h:16
T type
Definition vec.h:23
#define S(v0, v1)
Definition vec4.h:33