How to check if a line is intersecting with a circle in JavaScript?
I'm creating a library so it's easier for me to create HTML5 canvas games. I'm currently working on the collision detection. This is the code I wrote for line/circle collisions is below. object1 is an object containing the circle's x,…