Added rotateVector() based on the Qt implementation