Going to rework this, ignore this commit.

This commit is contained in:
Super Spy committed 2012-06-12 12:04:39 -05:00
1 parent 1f53f4d1cd
commit f4b84a7013
2 files changed
+26 -245

No files matched your search

@@ -131,6 +131,21 @@ public final class Utilities
}
return getDirection(rot);
}
/**
* Get the cardinal compass direction of a location.
*
* @param location
* @return
*/
public static String getCardinalDirectionLoc(Location player) {
double rot = (player.getYaw() - 90) % 360;
if (rot < 0) {
rot += 360.0;
}
return getDirection(rot);
}
/**
* Converts a rotation to a cardinal direction name.