vec3 vec3::rotate(const vec4&v) const { vec4 i = v.conjugate(); i.normalize(); vec4 t = v.multiply(*this); vec4 f = t.multiply(i); return vec3(f.x, f.y, f.w); }
vec4 operator*(vec4 left, const float & right) { return left.multiply(right); }
vec4 operator*(vec4 vector, const vec4& other_vector) { return vector.multiply(other_vector); }