| 99 | T length2() const { return x*x + y*y + z*z + w*w; } |
| 100 | T length() const { return std::sqrt(x*x + y*y + z*z + w*w); } |
| 101 | void normalize() { *this /= length(); } |
| 102 | |
| 103 | vec4<T>& translate(const vec4<T>& vector); |
| 104 | vec4<T> project(vec4<T>& direction, bool normalized = false) const |