Arbitrary-angle rotation of the polarization of a dipolar Bose-Einstein condensate