Ifit is a random position and I write the next:
Random integer from hole radius
To canvas1 width – hole radius
That means that my ball will start from at least a distance of its radius until the width of the canvas less its radius? but if I start in the middle of the canvas the ball will go over the edge. Thank you for your help!
Ok I got it, I was assuming that the initial possition started from the final possition of the ball (plus the radius to the canvas width less the radius), so now I understand that 0 position is the left limit of the canvas. Thank you so much!