c# - Circle and line segment collision -


this question has answer here:

what algorithm use check whether line intersects circle? , @ coordinate along circles edge occurred?

calculate distance between center of circle , line described here.

check if closest point between endpoints of line segment. if between them, check if distance smaller radius; otherwise check if 1 of edge points inside circle.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -