There is a lot of subtlety and nuance to this question. As Bark'n and others have pointed out, ultimately it will depend upon the statutes of your state, especially with regards to weapon in a vehicle. In some states, it is perfectly legal to openly display a weapon in a vehicle, even without a permit, in others it must be concealed.
In attempting some research on this topic, I did come across a few interesting things, regarding the definition of brandishing. Generally speaking, it is accepted that the laws against brandishing are taken to mean using a weapon in a manner to intimidate or cause terror in an otherwise peaceful people. In some cases, displaying a weapon is considered a form of assault. I have also seen references to the "reasonable man" concept as part of the statute as in what would a normal, reasonable person think in this situation.
I also think that presence within a vehicle is important. In many states a vehicle is considered an extension of your private, protected space, via castle doctrine. Lets say for example, if one were to answer their front door with a gun in hand, is that brandishing? Is that a crime? Is it assault? In the particular case in question, the person banging on your car window, is an act of aggression tantamount to assault. For clarity, I mean banging as being with obvious hostile intent and different from say knocking to get your attention (reasonable person definition applies here). So even if displaying a weapon is a form assault, you are responding to a form of assault with equal force (assault) but also with the threat of lethal force.
Edit: perhaps there is a distinction between displaying a weapon and pointing the business end of it at someone?