Skip to content
Advertisement

Intersection between 2 circles javascript

I’m trying to do a function to detect intersections between two circles. If yes it scores true, otherwise it scores false, but I think I got lost so it does not display what I want. If anyone can help me please . Thank you Surely I have incorrectly coded in javascript if there is a person who knows the answer I am all ears

JavaScript

Advertisement

Answer

Javascript natively offers a hypothenus function,
useful here to calculate the distance between 2 points on a 2 D system

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement