title: How does path.bounds() work?
body: <p>Can someone tell me what exactly happens with the following code? I understand it is used for zooming, but what does the 2-d array of bounds do in this context?</p>
  
  <pre><code>var bounds = path.bounds(d), 
      dx = bounds[1][0] - bounds[0][0], 
      dy = bounds[1][1] - bounds[0][1],
      x = (bounds[0][0] + bounds[1][0]) / 2,
      y = (bounds[0][1] + bounds[1][1]) / 2,
              scale = .9 / Math.max(dx / width, dy / height),
      translate = [width / 2 - scale * x, height / 2 - scale * y];
  </code></pre>
  
  <p>Thanks in advance.</p>