I know it's not an easy one, My take is when a dog wags its tail It generally means it's happy and friendly, not so with a cat. This dog got to close to a cat wagging it tail, got scratch, note the bandages on it's nose.
Yes, my little cat ..RIP...would wag his tail when he was annoyed with me.....more like a high flipping motion.