That is useful for hitting a surface and getting the angle for that, but I mean like adjusting vector x and vector y to move in a certain angle.
For an example, if a player was hit in a certain direction the velocity would be set accordingly. This is fairly straight forward for 8 basic directions, but I was wondering how I could do the angles inbetween.
Knockback (K) = 100
Left - Vector X: K*-1, Vector Y: K*0
Left Up - Vector X: K*-0.5, Vector Y: K*-0.5
Up - Vector X: K*0, Vector Y: K*-1
Up Right - Vector X: K*0.5, Vector Y: K*-0.5
Right - Vector X: K*1, Vector Y: K*0
Down Right - Vector X: K*0.5, Vector Y: K*0.5
Down - Vector X: K*0, Vector Y: K*1
Down Left - Vector X: K*-0.5, Vector Y: K*0.5