so I have x circles, given by X,Y coordinates + radius.
I'm unsuccessfully trying to figure out, how to make an algorithm for counting how many circles will line segment cross. For illustration: 1 (Green line crossed 2 circles, red line crossed 1)
I know the starting and ending points of line segments + circles as stated before. Tried to solve it with vector distance equation. The code i wrote was like this (Already googled answers):
for(int i = 0; i
, but the code didn't work.