title: As mass goes up, speed goes down
body: <p>Trying to develop an <a href="http://agar.io" rel="nofollow">Agar</a> clone, and I've got a lot of it, but I can't quite figure out how to decrement the player's speed as its mass increases. I've tried several different ways, but nothing works. How would I make the speed go down as the mass goes up? Here's my <a href="https://jsfiddle.net/khanfused/wtqk7Lu2/3/" rel="nofollow">jsFiddle</a>. This is where I set the speed of of the players:</p>
  
  <pre><code>var playerOneMass = 36;
  var player1X = (canvas.width / 2) + 50;
  var player = new Player({
      x: player1X,
      y: canvas.height / 2,
      radius: playerOneMass,
      speed: {
          x: 5,
          y: 5
      },
      name: "player 1",
      dir: null
  });
  var playerTwoMass = 36;
  var player2X = (canvas.width / 2) - 50;
  var player2 = new Player({
      x: player2X,
      y: canvas.height / 2,
      radius: playerTwoMass,
      speed: {
          x: 5,
          y: 5
      },
      name: "player 2",
      dir: null
  });
  </code></pre>