I'm going to Monday morning quarterback this. A you should have rolled your windows up immediately. Turned the car around immediately. Since you didn't you now have these concerns about your actions. You did great in that you escaped without injury and without having to shoot.
I would have shot only because I have decided to take my chances in court before taking a beating. This guy was trying to rob you and threatening to kill you.
Windows up so he had to break it.....then bang