title: Checking if a point is inside a rectangle with rounded corners
body: <p>I am looking for a formula, if any to find out if a point is inside a rectangle which has rounded corners. </p>
  
  <p>I am using JavaScript and SVG to draw points in a rectangle of variable height and width and corner radius. </p>
  
  <p>I am looking for something similar to this formula which finds if a point is inside a circle</p>
  
  <pre><code>Math.pow((x - centerX, 2) + Math.pow(y - centerY, 2) &lt; Math.pow(r, 2)
  </code></pre>