Created
January 10, 2015 20:04
-
-
Save komplexb/ad6333d8734eb4ffcb82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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