{"action":"created","issue":{"url":"https://api.github.com/repos/mo-c/moses-cpp-learning/issues/106","labels_url":"https://api.github.com/repos/mo-c/moses-cpp-learning/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/mo-c/moses-cpp-learning/issues/106/comments","events_url":"https://api.github.com/repos/mo-c/moses-cpp-learning/issues/106/events","html_url":"https://github.com/mo-c/moses-cpp-learning/issues/106","id":88179621,"number":106,"title":"straight-line: bad call to line_in_horizontal()","user":{"login":"lcabrini","id":98929,"avatar_url":"https://avatars.githubusercontent.com/u/98929?v=3","gravatar_id":"","url":"https://api.github.com/users/lcabrini","html_url":"https://github.com/lcabrini","followers_url":"https://api.github.com/users/lcabrini/followers","following_url":"https://api.github.com/users/lcabrini/following{/other_user}","gists_url":"https://api.github.com/users/lcabrini/gists{/gist_id}","starred_url":"https://api.github.com/users/lcabrini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcabrini/subscriptions","organizations_url":"https://api.github.com/users/lcabrini/orgs","repos_url":"https://api.github.com/users/lcabrini/repos","events_url":"https://api.github.com/users/lcabrini/events{/privacy}","received_events_url":"https://api.github.com/users/lcabrini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-14T12:48:57Z","updated_at":"2015-06-14T21:00:46Z","closed_at":null,"body":"The call to line_is_horizontal() is not correct.\r\n\r\n1. It must be called at the right place. Try to figure out at exactly which point in the code it would make sense to find out if the line is horizontal.\r\n2. You are assigning the return of line_is_horizontal to a variable called y, which is a double. But the function returns a boolean, not a double. The function returns true if the line is horizontal or false if it is not.\r\n3. The name of the variable y does not make sense at all in this context. It would be expected that y is to hold a y-coordinate, but line_is_horizontal does not return a coordinate, it returns true or false."},"comment":{"url":"https://api.github.com/repos/mo-c/moses-cpp-learning/issues/comments/111875821","html_url":"https://github.com/mo-c/moses-cpp-learning/issues/106#issuecomment-111875821","issue_url":"https://api.github.com/repos/mo-c/moses-cpp-learning/issues/106","id":111875821,"user":{"login":"lcabrini","id":98929,"avatar_url":"https://avatars.githubusercontent.com/u/98929?v=3","gravatar_id":"","url":"https://api.github.com/users/lcabrini","html_url":"https://github.com/lcabrini","followers_url":"https://api.github.com/users/lcabrini/followers","following_url":"https://api.github.com/users/lcabrini/following{/other_user}","gists_url":"https://api.github.com/users/lcabrini/gists{/gist_id}","starred_url":"https://api.github.com/users/lcabrini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcabrini/subscriptions","organizations_url":"https://api.github.com/users/lcabrini/orgs","repos_url":"https://api.github.com/users/lcabrini/repos","events_url":"https://api.github.com/users/lcabrini/events{/privacy}","received_events_url":"https://api.github.com/users/lcabrini/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T21:00:46Z","updated_at":"2015-06-14T21:00:46Z","body":"The code I just wrote was meant to be in main(). You are calling the line_is_horizontal() function from there, getting the return value (true or false) and acting on it."}}