{"action":"closed","issue":{"url":"https://api.github.com/repos/craftworkgames/MonoGame.Extended/issues/511","repository_url":"https://api.github.com/repos/craftworkgames/MonoGame.Extended","labels_url":"https://api.github.com/repos/craftworkgames/MonoGame.Extended/issues/511/labels{/name}","comments_url":"https://api.github.com/repos/craftworkgames/MonoGame.Extended/issues/511/comments","events_url":"https://api.github.com/repos/craftworkgames/MonoGame.Extended/issues/511/events","html_url":"https://github.com/craftworkgames/MonoGame.Extended/issues/511","id":330105376,"node_id":"MDU6SXNzdWUzMzAxMDUzNzY=","number":511,"title":"CircleF.Contains() uses incorrect formula.","user":{"login":"dualdragoon","id":3407599,"node_id":"MDQ6VXNlcjM0MDc1OTk=","avatar_url":"https://avatars3.githubusercontent.com/u/3407599?v=4","gravatar_id":"","url":"https://api.github.com/users/dualdragoon","html_url":"https://github.com/dualdragoon","followers_url":"https://api.github.com/users/dualdragoon/followers","following_url":"https://api.github.com/users/dualdragoon/following{/other_user}","gists_url":"https://api.github.com/users/dualdragoon/gists{/gist_id}","starred_url":"https://api.github.com/users/dualdragoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dualdragoon/subscriptions","organizations_url":"https://api.github.com/users/dualdragoon/orgs","repos_url":"https://api.github.com/users/dualdragoon/repos","events_url":"https://api.github.com/users/dualdragoon/events{/privacy}","received_events_url":"https://api.github.com/users/dualdragoon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-06-07T03:38:43Z","updated_at":"2018-06-18T10:33:13Z","closed_at":"2018-06-18T10:33:13Z","author_association":"NONE","body":"The CircleF.Contains() method simply subtracts the point provided from the center of the circle and then checks that the absolute values of the resulting value's x and y are less than or equal to the radius of the circle. However this does not work for telling if something is actually within the circle. Say you have a circle centered at 16,16 with a radius of 16. If you were to check the point 0,0 which is not within the circle but still fulfills the check then you get an incorrect response. I know that using the Math.Sqrt() method isn't very efficient but using the actual distance formula would result in the correct response. Without using the distance formula the CircleF is pretty much treated as a square for the purposes of the Contains() method as it currently is."}}
{"actor":{"display_login":"craftworkgames"}}