Even better is that it lets you use WASD instead of the cursos keys!
I was also going for rotational smoothing, similar to what you'd get from joystick input. Because only eight directions can come from the WASD keys, I use this function to add the in-between directions.
I'm using this for a third-person action game, my Supercat project. It's not evident in any of the videos though, because I only just improved my getWASD() function yesterday.