I think it rotates the vector v and adds the result to p. It does work – it's the same as the original example.