diff options
Diffstat (limited to 'vec.h')
-rw-r--r-- | vec.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -30,6 +30,10 @@ struct vec3 { T y; T z; + static vec3 zero() { + return vec3{0, 0, 0}; + } + vec3 operator+(const vec3 &b) const { return vec3{.x=x + b.x, .y=y + b.y, .z=z + b.z}; } |