{"action":"created","issue":{"url":"https://api.github.com/repos/OgarProject/Ogar/issues/154","labels_url":"https://api.github.com/repos/OgarProject/Ogar/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/OgarProject/Ogar/issues/154/comments","events_url":"https://api.github.com/repos/OgarProject/Ogar/issues/154/events","html_url":"https://github.com/OgarProject/Ogar/pull/154","id":97243816,"number":154,"title":"Fix collision checking by square. Collision checking by CIRCLE now.","user":{"login":"maixuanhan","id":12881054,"avatar_url":"https://avatars.githubusercontent.com/u/12881054?v=3","gravatar_id":"","url":"https://api.github.com/users/maixuanhan","html_url":"https://github.com/maixuanhan","followers_url":"https://api.github.com/users/maixuanhan/followers","following_url":"https://api.github.com/users/maixuanhan/following{/other_user}","gists_url":"https://api.github.com/users/maixuanhan/gists{/gist_id}","starred_url":"https://api.github.com/users/maixuanhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maixuanhan/subscriptions","organizations_url":"https://api.github.com/users/maixuanhan/orgs","repos_url":"https://api.github.com/users/maixuanhan/repos","events_url":"https://api.github.com/users/maixuanhan/events{/privacy}","received_events_url":"https://api.github.com/users/maixuanhan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-25T18:03:51Z","updated_at":"2015-07-25T18:11:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OgarProject/Ogar/pulls/154","html_url":"https://github.com/OgarProject/Ogar/pull/154","diff_url":"https://github.com/OgarProject/Ogar/pull/154.diff","patch_url":"https://github.com/OgarProject/Ogar/pull/154.patch"},"body":"I don't use `SQRT()` function, even it is used in old `getSize()`. This new checking type should not cause any lagyy or lot of computations.\r\n\r\nAnd, I have a small question about the `getSize()` function.\r\n``` javascript\r\nCell.prototype.getSize = function() {\r\n    // Calculates radius based on cell mass\r\n    return Math.ceil(Math.sqrt(100 * this.mass));\r\n};\r\n```\r\nWhat is the logic behind that code? I was thinking that `MASS = (R ^ 2) * 3.14`. Now, it looks like `MASS = (R / 10) ^ 2`. Anyway, if it's just an approximate calculation, I can accept it and have no more question about that."},"comment":{"url":"https://api.github.com/repos/OgarProject/Ogar/issues/comments/124868745","html_url":"https://github.com/OgarProject/Ogar/pull/154#issuecomment-124868745","issue_url":"https://api.github.com/repos/OgarProject/Ogar/issues/154","id":124868745,"user":{"login":"Ephemerality","id":7145692,"avatar_url":"https://avatars.githubusercontent.com/u/7145692?v=3","gravatar_id":"","url":"https://api.github.com/users/Ephemerality","html_url":"https://github.com/Ephemerality","followers_url":"https://api.github.com/users/Ephemerality/followers","following_url":"https://api.github.com/users/Ephemerality/following{/other_user}","gists_url":"https://api.github.com/users/Ephemerality/gists{/gist_id}","starred_url":"https://api.github.com/users/Ephemerality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ephemerality/subscriptions","organizations_url":"https://api.github.com/users/Ephemerality/orgs","repos_url":"https://api.github.com/users/Ephemerality/repos","events_url":"https://api.github.com/users/Ephemerality/events{/privacy}","received_events_url":"https://api.github.com/users/Ephemerality/received_events","type":"User","site_admin":false},"created_at":"2015-07-25T18:11:39Z","updated_at":"2015-07-25T18:11:39Z","body":"Same change was made in another fork, will probably be adding manually soon, thanks for posting.\r\nThe getSize formula is the same used be the client convert size to mass. `Mass = sqrt(100 * size)` and `size = (mass ^ 2) / 100`."}}