title: A JavaScript function that returns the x,y points of intersection between two circles?
body: <p><img src="https://i.stack.imgur.com/wn1yN.jpg" alt="enter image description here"></p>
  
  <p>I got the (x,y) center location of two circles and their radius but I need to find their intersection points (marked with red) using JavaScript.</p>
  
  <p>I think the best explanation as far as the math is concerned is found <a href="http://paulbourke.net/geometry/circlesphere/" rel="noreferrer">here</a> (Intersection of two circles), but I don't really understand the math so I'm not able to implement it.</p>
  
  <p>For example d = ||P1 - P0|| , what do the || stand for? Does it mean that the resulting number is always a positive?</p>
  
  <p>And also P2 = P0 + a ( P1 - P0 ) / d , aren't the P's here something like (10, 50)? But doing (10,50)+13 in JavaScript gives you 63, so it just ignores the first number, so what's suppose to happen? Should the outcome be (23,63) here or? And also the P1-P0 part or (40,30)-(10,60), how do you express that in JavaScript?</p>