Tail swished violently from side to side - this is the conflict signal of tail wagging in its most angry version. If the tail swings very vigorously from side to side it usually means that the animal is about to attack, if it can summon up that last ounce of aggression.
Pulled in two different directions at once, it stands still and wags its tail. Any two opposing urges would produce the same reaction, and only when one of these was the urge to attack - frustrated by fear or some other competing mood - could we say that the cat was wagging its tail because it was angry.
So the cat is angry because it wants to attack but something is preventing it. The author is not specific about that something in the chapter on tail wagging (I haven’t checked the whole book).
(An example of tail wagging not associated with anger is when the cat cries to be let out and the door is opened to reveal a downpour of heavy rain. If it rushes out and stands in the rain its tail will wag, indicating a conflict. It will either rush back into the comfort of the house to avoid the rain or set off to patrol its territory. When it has resolved this conflict it will stop wagging its tail.)
Interesting. Thanks are due to ultrafilter.