For me the best way is to stay as calm as possible and after a while, the angry person will realize how bad his/her reaction is.
Sadly, not all of the people can be that type of person. A lot of people will be angry and after that they will be calming down but most of them don't see their actions as wrong since not all of the people will be staying at that type of state forever. After they calmed down they might be angry again, the best thing to do is to talk to that person when they are calming down, that is the best time to make amends or maybe explain them what to do to them and what could happen if another rage happens.