fix missing namespace in vectors
parent
1d7775a742
commit
1cd889ff05
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue