lib/move.js
function turnToDegrees (turn, speed, degrees) {
  turn = Math.max(Math.min(turn, 100), -100)

  var opts = turnToSpeeds(turn, speed)
  opts.left = { speed: opts.left }
  opts.right = { speed: opts.right }

  var reducedSpeed = otherSpeed(turn, speed)
  var reducedDegrees = Math.round((reducedSpeed / speed) * degrees)

  opts.left.degrees = turn < 0 ? reducedDegrees : degrees
  opts.right.degrees = turn > 0 ? reducedDegrees : degrees

  return opts
}
function turnToDegrees (turn, speed, degrees) {
  turn = Math.max(Math.min(turn, 100), -100)

  var opts = turnToSpeeds(turn, speed)
  opts.left = { speed: opts.left }
  opts.right = { speed: opts.right }

  var reducedSpeed = otherSpeed(turn, speed)
  var reducedDegrees = Math.round((reducedSpeed / speed) * degrees)

  opts.left.degrees = turn < 0 ? reducedDegrees : degrees
  opts.right.degrees = turn > 0 ? reducedDegrees : degrees

  return opts
}
function turnToDegrees ( turn , speed , degrees ) { turn = Math . max ( Math . min ( turn , 100 ) , - 100 ) var opts = turnToSpeeds ( turn , speed ) opts . left = { speed : opts . left } opts . right = { speed : opts . right } var reducedSpeed = otherSpeed ( turn , speed ) var reducedDegrees = Math . round ( ( reducedSpeed / speed ) * degrees ) opts . left . degrees = turn < 0 ? reducedDegrees : degrees opts . right . degrees = turn > 0 ? reducedDegrees : degrees return opts }
Params for degrees based on turn
@param  {Number} turn
@param  {Number} speed
@param  {Number} degrees
@return {Object} opts    object of degrees and speed for each motor
Params for degrees based on turn