prototype for quatRotate