Skip to content

Instantly share code, notes, and snippets.

@komplexb
Created January 10, 2015 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save komplexb/ad6333d8734eb4ffcb82 to your computer and use it in GitHub Desktop.
Save komplexb/ad6333d8734eb4ffcb82 to your computer and use it in GitHub Desktop.
var pointsObj = { N:0, E:90, S:180, W:270 };
var _getDegree = function (orientation) {
switch (orientation) {
case "N":
return 0;
case "E":
return 90;
case "S":
return 180;
case "W":
return 270;
}
};
var _getOrientation = function (degrees) {
switch (degrees) {
case 0:
return "N";
case 90:
return "E";
case 180:
return "S";
case 270:
return "W";
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment