I've been working with an array allShapes. This array consists of objects with the same kinds of properties, like each object has a .x value, and a .y value.
Each shape has a "radius", so the detection can be easily done. For each object, the radius is exactly the same. It equals 10.
How can I effeciently make a function that checks if one shape is colliding with another? Thanks in advance!
var allShapes = [{70,30},{40,90},{287,245}];
// allShapes[0].x = 70
// For each object, there is a .x and .y value