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

  var reducedSpeed = otherSpeed(turn, speed)
  reducedSpeed = percentToSpeed(reducedSpeed)
  speed = percentToSpeed(speed)

  return {
    left: turn < 0 ? reducedSpeed : speed,
    right: turn > 0 ? reducedSpeed : speed
  }
}
function turnToSpeeds (turn, speed) {
  turn = Math.max(Math.min(turn, 100), -100)

  var reducedSpeed = otherSpeed(turn, speed)
  reducedSpeed = percentToSpeed(reducedSpeed)
  speed = percentToSpeed(speed)

  return {
    left: turn < 0 ? reducedSpeed : speed,
    right: turn > 0 ? reducedSpeed : speed
  }
}
function turnToSpeeds ( turn , speed ) { turn = Math . max ( Math . min ( turn , 100 ) , - 100 ) var reducedSpeed = otherSpeed ( turn , speed ) reducedSpeed = percentToSpeed ( reducedSpeed ) speed = percentToSpeed ( speed ) return { left : turn < 0 ? reducedSpeed : speed , right : turn > 0 ? reducedSpeed : speed } }
Convert turn in to left and right speeds
@param  {Number} turn  -100 to 100
@param  {Number} speed
@return {Object}
Convert turn in to left and right speeds