title: Circle to Circle collision function Javascript
body: <p>I wrote a circle to circle collision function but I think I made a little mistake and I can't see to find it.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function testCollisionArc(arc1,arc2){
    return arc1.x + arc1.r + arc2.r &gt; arc2.x 
    &amp;&amp; arc1.x &lt; arc2.x + arc1.r + arc2.r
    &amp;&amp; arc1.y + arc1.r + arc2.r &gt; arc2.y 
    &amp;&amp; arc1.y &lt; arc2.y + arc1.r + arc2.r
  }</code></pre>
  </div>
  </div>
  </p>