(Sorry if I'm posting in the wrong section and my bad english)
So, I'm wondering what formula can I use to calculate the distance that there's from a XY position unto the nearest point (edge) of a square.
I have all the needed info: XY (red/green) points position, square's position and it's radius (size/2), I'm just needing the formula.
Regards.
So, I'm wondering what formula can I use to calculate the distance that there's from a XY position unto the nearest point (edge) of a square.
I have all the needed info: XY (red/green) points position, square's position and it's radius (size/2), I'm just needing the formula.
Regards.
Last edited: