Consider the following code :
if (xPoint > 0 && yPoint > 0) { m_navigations = Directions.SouthEast; } else if (xPoint > 0 && yP
Use signum to get -1, 0 or 1 on the direction like this:
String direction = Integer.signum(xPoint)+","+Integer.signum(yPoint); switch(direction){ case "1,1": m_navigations = Directions.SouthEast; break; case "-1,0" m_navigations = Directions.West; break; etc.. }