March 2017
Intermediate to advanced
480 pages
11h 3m
English
Determining if two circles intersect is extremely simple. If the length of a line going from the center of circle A to the center of circle B is less than the sum of the two circles, radii, they intersect. Of course, we want to avoid the expensive square root operation performed when finding the length of a line. To avoid this, we can compare the square length of the line against the square sum of the two circles, radii:

We are going to implement a function to detect the collision between two circles. To avoid the expensive square root operation involved in finding the distance between two circles, we're going to find ...
Read now
Unlock full access