11Vec4::Vec4(
float r,
float g,
float b,
float a): r(r),g(g),b(b),a(a){}
23Vertex::Vertex(
Vec2 pos,
Vec2 texcoords,
int layer,
float texID): position(pos),texcoords(texcoords),layer(layer),texID(texID){}
26 return {a.
x+b.
x,a.
y+b.
y};
30 return {a.
x-b.
x,a.
y-b.
y};
34 return {a.
x*b.
x,a.
y*b.
y};
46 return {a.
x/b.
x,a.
y/b.
y};
61 os<<
"["<<v.
x<<
","<<v.
y<<
"]";
66 os<<
"["<<v.
r<<
","<<v.
g<<
","<<v.
b<<
"]";
71 os<<
"["<<v.
r<<
","<<v.
g<<
","<<v.
b<<
","<<v.
a<<
"]";
81 os<<
"Position: "<<v.
pos<<
" Color: "<<v.
color<<
" Layer: "<<v.
layer;
96 os<<
"Position: "<<v.
pos<<
" Size: "<<v.
size<<
" Velocity: "<<v.
vel;
Vec2 operator-(Vec2 a, Vec2 b)
Vec2 operator*(Vec2 a, Vec2 b)
Vec2 operator/(Vec2 a, Vec2 b)
std::ostream & operator<<(std::ostream &os, const Vec2 &v)
Vec2 operator+(Vec2 a, Vec2 b)