Self Defense in a Car

I would think it is in the clear if you gun it, swerve to avoid the perp and they leap out in front of you thinking I will stop. I mean, how is that on me?

I was passenger in a car when a similar situation happened.

My friend was driving and it was mid-afternoon right before the “people going home” traffic started. We were going to a restaurant to eat down a four lane street when we saw a guy just standing in one of our two lanes. We slowed when we got near him but didn’t stop and he randomly decided to finally cross the street right when we got close and my friend had to slam on the brakes about ten feet away from him. He stops right in front of our car and stared at us, my friend rolls down his window and starts yelling at the guy to get to the sidewalk already, and the man started slowly walking towards our car yelling stuff back. My friend went to turn to get around this guy but this guy for some reason tried to jump in front of the car (to get us to stop for some reason?) But my friend just barely missed him and drove away, and in the rear view mirror we saw this guy angrily give us the finger.

Always wondered what would have happened if we did hit him since he made an earnest attempt to lunge right into our hood.