{"action":"created","issue":{"url":"https://api.github.com/repos/aliekens/hexxx/issues/16","labels_url":"https://api.github.com/repos/aliekens/hexxx/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/aliekens/hexxx/issues/16/comments","events_url":"https://api.github.com/repos/aliekens/hexxx/issues/16/events","html_url":"https://github.com/aliekens/hexxx/pull/16","id":108937167,"number":16,"title":"implemented (naive) buffer rotation","user":{"login":"christophevg","id":124216,"avatar_url":"https://avatars.githubusercontent.com/u/124216?v=3","gravatar_id":"","url":"https://api.github.com/users/christophevg","html_url":"https://github.com/christophevg","followers_url":"https://api.github.com/users/christophevg/followers","following_url":"https://api.github.com/users/christophevg/following{/other_user}","gists_url":"https://api.github.com/users/christophevg/gists{/gist_id}","starred_url":"https://api.github.com/users/christophevg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophevg/subscriptions","organizations_url":"https://api.github.com/users/christophevg/orgs","repos_url":"https://api.github.com/users/christophevg/repos","events_url":"https://api.github.com/users/christophevg/events{/privacy}","received_events_url":"https://api.github.com/users/christophevg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-29T19:00:23Z","updated_at":"2015-09-29T20:19:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aliekens/hexxx/pulls/16","html_url":"https://github.com/aliekens/hexxx/pull/16","diff_url":"https://github.com/aliekens/hexxx/pull/16.diff","patch_url":"https://github.com/aliekens/hexxx/pull/16.patch"},"body":"Added rotation to buffer, using newly introduced unit2led(x,y) conversion. The latter might benefit from a decent algorithm, now it takes a constant HEXAGON_LED_COUNT sqrts :-("},"comment":{"url":"https://api.github.com/repos/aliekens/hexxx/issues/comments/144180345","html_url":"https://github.com/aliekens/hexxx/pull/16#issuecomment-144180345","issue_url":"https://api.github.com/repos/aliekens/hexxx/issues/16","id":144180345,"user":{"login":"aliekens","id":973813,"avatar_url":"https://avatars.githubusercontent.com/u/973813?v=3","gravatar_id":"","url":"https://api.github.com/users/aliekens","html_url":"https://github.com/aliekens","followers_url":"https://api.github.com/users/aliekens/followers","following_url":"https://api.github.com/users/aliekens/following{/other_user}","gists_url":"https://api.github.com/users/aliekens/gists{/gist_id}","starred_url":"https://api.github.com/users/aliekens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliekens/subscriptions","organizations_url":"https://api.github.com/users/aliekens/orgs","repos_url":"https://api.github.com/users/aliekens/repos","events_url":"https://api.github.com/users/aliekens/events{/privacy}","received_events_url":"https://api.github.com/users/aliekens/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T20:19:47Z","updated_at":"2015-09-29T20:19:47Z","body":"Would love to see a sample app that demonstrates its use. Hard to accept without some sort of testing, even if it is seeing a nice new demo app ;) (I know this is part of something bigger)\r\n\r\nAs it stands, rotating a buffer requires the user to create a new one. If users rotate like crazy, they are likely to cause mayhem and generate memory leaks. If `Buffer::rotate()` is implemented as a mutating instead of non-mutating method, we can isolate memory handling for a temporary buffer. \r\n\r\nAlso, there will certainly be use cases for a non-mutating version (they could be used complementary), too, but I would write it as `Buffer* Buffer::rotate( double angle )` and have the rotated buffer returned, instead of the proposed approach that reminds me of C.\r\n\r\nI do like the `unit2led()` plan. I'm pondering optimizations, now, too (is there something like a hexagonal version of binary search???) but would love to merge that as is."}}