No, this is not what I want to get.
Maybe I was not precise enough in my question.
When I said "constant speed", I mean that speed in horizontal/vertical should be the same than in diagonal, but in a lot of games if we push the axis just a little the avatar moves more slowly. I want this behavior.
for exemple:
- if the input is (100, 0) I want to get (1.0, 0.0)
- if the input is (20, 0) I want to get (0.2, 0.0)
- if the input is (100, 100) I want to get (cos (pi/4), sin (pi/4)) => (0.7071, 0.7071)
- if the input is (20, 20) I want to get (cos (pi/4), sin (pi/4)) / 5 => (0.14142, 0.14142)