diff options
Diffstat (limited to '')
-rw-r--r-- | simple-classes.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/simple-classes.hpp b/simple-classes.hpp new file mode 100644 index 0000000..80743d4 --- /dev/null +++ b/simple-classes.hpp @@ -0,0 +1,23 @@ +#pragma once + +namespace math { + // a class is a glorified struct + class vec3i { + public: + // members + int x; + int y; + int z; + + // default constructor + vec3i(); + // copy constructor + vec3i(const vec3i& other); + // custom constructor + vec3i(int x_, int y_, int z_); + + // method + void zero(); + int dot(const vec3i& other) const; + }; +} |