fix missing namespace in vectors

v1
Brett 2023-02-28 23:31:39 -05:00
parent 1d7775a742
commit 1cd889ff05
1 changed files with 215 additions and 208 deletions

View File

@ -10,6 +10,8 @@
#include <initializer_list>
#include <cmath>
namespace blt {
template<typename T, unsigned long size>
struct vec {
private:
@ -36,8 +38,11 @@ struct vec {
vec(const vec<T, size>& copy): vec(copy.elements) {}
[[nodiscard]] inline T x() const { return elements[0]; }
[[nodiscard]] inline T y() const { return elements[1]; }
[[nodiscard]] inline T z() const { return elements[2]; }
[[nodiscard]] inline T w() const { return elements[3]; }
inline T& operator[](int index) {
@ -222,4 +227,6 @@ typedef vec2f vec2;
typedef vec3f vec3;
typedef vec4f vec4;
}
#endif //BLT_TESTS_VECTORS_H