| 13 | |
| 14 | namespace { |
| 15 | static vec2<u16> wrap(const vec2<u16> &v, const vec2<u16> &size) { |
| 16 | // Wrap the vector v around the size |
| 17 | return vec2<u16>(v.x % size.x, v.y % size.y); |
| 18 | } |
| 19 | |
| 20 | static vec2<u16> wrap_x(const vec2<u16> &v, const u16 width) { |
| 21 | // Wrap the x component of the vector v around the size |