code: function(direction) {
          return {
              x: Math.round(Math.cos(direction * (Math.PI / 180)) * 1000) / 1000,
              y: Math.round(Math.sin(direction * (Math.PI / 180)) * 1000) / 1000
          };
      }
docs: Takes an amount in degrees and converts it to an x/y object. Clamps to avoid rounding issues with sin/cos