The problem is that you're rotating the object like that, probably to have a "smooth" feeling to the rotation, right? You should just set the angle degree directly to what you want using "Set Angle" instead of "rotate to angle".
And to make diagonals works, you gotta check if it's between 0 and 50, I think. For instance, when you press up on the analog, the Y goes to -100 and X is 0, but if you press it UP + RIGHT, the Y is -50 and the X is 50.
If you press it to the right, Y is 0 and X is 100.
Probably you could translate these numbers directly to angles, but I wouldn't know how to do that..