def rotate_vec(self, vec):
        """
        https://code.google.com/p/kri/wiki/Quaternions
        v + 2.0*cross(q.xyz, cross(q.xyz,v) + q.w*v);
        """
        xyz = Vec3(self.x, self.y, self.z)
        return add_v3(vec, scale_v3(
            xyz.cross(xyz.cross(vec) + scale_v3(vec, self.w)), 2.0))