Determine the direction of a gameobject from vector2 without using if/else?

I have a gameobject in a 2D game that is controlled by a vector2 for the direction it is moving. the values in that vector2 come from input.GetAxis(“Horizontal”) etc. I need to determine what direction it is moving in from that vector2 (up/ down/ Left/ Right). i could easily use a few if/else statements to figure it out, but it feels like there is a mush easier and more efficient way of doing it. Is there anyone who know of another way or know if if-statements are the way to go? Thanks in advance.

Well if your are moving your character on the x-z plane then you can most likely simply do:

Vector3 direction3D = new Vector3();
direction3D.x = direction2D.x;
direction3D.z = direction2D.y;
transform.position += direction3D * speed;