{"action":"closed","number":342,"pull_request":{"url":"https://api.github.com/repos/ocornut/imgui/pulls/342","id":45482454,"html_url":"https://github.com/ocornut/imgui/pull/342","diff_url":"https://github.com/ocornut/imgui/pull/342.diff","patch_url":"https://github.com/ocornut/imgui/pull/342.patch","issue_url":"https://api.github.com/repos/ocornut/imgui/issues/342","number":342,"state":"closed","locked":false,"title":"fixed rendering of histogram with a lot of values","user":{"login":"nem0","id":153526,"avatar_url":"https://avatars.githubusercontent.com/u/153526?v=3","gravatar_id":"","url":"https://api.github.com/users/nem0","html_url":"https://github.com/nem0","followers_url":"https://api.github.com/users/nem0/followers","following_url":"https://api.github.com/users/nem0/following{/other_user}","gists_url":"https://api.github.com/users/nem0/gists{/gist_id}","starred_url":"https://api.github.com/users/nem0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nem0/subscriptions","organizations_url":"https://api.github.com/users/nem0/orgs","repos_url":"https://api.github.com/users/nem0/repos","events_url":"https://api.github.com/users/nem0/events{/privacy}","received_events_url":"https://api.github.com/users/nem0/received_events","type":"User","site_admin":false},"body":"When I draw a histogram with many elements (40+ on my computer), some values are rendered twice and some are skipped. It is caused by this code in ImGui::PlotEx:\r\n\r\n```cpp\r\n    ...\r\n    for (int n = 0; n < res_w; n++)\r\n    {\r\n        const float t1 = t0 + t_step;\r\n        const int v_idx = (int)(t0 * values_count);\r\n    ...\r\n```\r\n\r\nProblem is the int cast. \r\n\r\nn == 23 -> t0 * values_count == 23.0000019 -> v_idx == 23\r\nn == 24 -> t0 * values_count == 23.9999987 -> v_idx == 23\r\n","created_at":"2015-09-19T19:13:26Z","updated_at":"2015-09-20T09:26:14Z","closed_at":"2015-09-20T09:26:14Z","merged_at":"2015-09-20T09:26:14Z","merge_commit_sha":"2dcd669cef0e39ec8bc0ebb61d9f47d06aa10865","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ocornut/imgui/pulls/342/commits","review_comments_url":"https://api.github.com/repos/ocornut/imgui/pulls/342/comments","review_comment_url":"https://api.github.com/repos/ocornut/imgui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ocornut/imgui/issues/342/comments","statuses_url":"https://api.github.com/repos/ocornut/imgui/statuses/93200a6c370cd1e9606718ee286901cb82d135dd","head":{"label":"nem0:master","ref":"master","sha":"93200a6c370cd1e9606718ee286901cb82d135dd","user":{"login":"nem0","id":153526,"avatar_url":"https://avatars.githubusercontent.com/u/153526?v=3","gravatar_id":"","url":"https://api.github.com/users/nem0","html_url":"https://github.com/nem0","followers_url":"https://api.github.com/users/nem0/followers","following_url":"https://api.github.com/users/nem0/following{/other_user}","gists_url":"https://api.github.com/users/nem0/gists{/gist_id}","starred_url":"https://api.github.com/users/nem0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nem0/subscriptions","organizations_url":"https://api.github.com/users/nem0/orgs","repos_url":"https://api.github.com/users/nem0/repos","events_url":"https://api.github.com/users/nem0/events{/privacy}","received_events_url":"https://api.github.com/users/nem0/received_events","type":"User","site_admin":false},"repo":{"id":42786096,"name":"imgui","full_name":"nem0/imgui","owner":{"login":"nem0","id":153526,"avatar_url":"https://avatars.githubusercontent.com/u/153526?v=3","gravatar_id":"","url":"https://api.github.com/users/nem0","html_url":"https://github.com/nem0","followers_url":"https://api.github.com/users/nem0/followers","following_url":"https://api.github.com/users/nem0/following{/other_user}","gists_url":"https://api.github.com/users/nem0/gists{/gist_id}","starred_url":"https://api.github.com/users/nem0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nem0/subscriptions","organizations_url":"https://api.github.com/users/nem0/orgs","repos_url":"https://api.github.com/users/nem0/repos","events_url":"https://api.github.com/users/nem0/events{/privacy}","received_events_url":"https://api.github.com/users/nem0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nem0/imgui","description":"Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies","fork":true,"url":"https://api.github.com/repos/nem0/imgui","forks_url":"https://api.github.com/repos/nem0/imgui/forks","keys_url":"https://api.github.com/repos/nem0/imgui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nem0/imgui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nem0/imgui/teams","hooks_url":"https://api.github.com/repos/nem0/imgui/hooks","issue_events_url":"https://api.github.com/repos/nem0/imgui/issues/events{/number}","events_url":"https://api.github.com/repos/nem0/imgui/events","assignees_url":"https://api.github.com/repos/nem0/imgui/assignees{/user}","branches_url":"https://api.github.com/repos/nem0/imgui/branches{/branch}","tags_url":"https://api.github.com/repos/nem0/imgui/tags","blobs_url":"https://api.github.com/repos/nem0/imgui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nem0/imgui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nem0/imgui/git/refs{/sha}","trees_url":"https://api.github.com/repos/nem0/imgui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nem0/imgui/statuses/{sha}","languages_url":"https://api.github.com/repos/nem0/imgui/languages","stargazers_url":"https://api.github.com/repos/nem0/imgui/stargazers","contributors_url":"https://api.github.com/repos/nem0/imgui/contributors","subscribers_url":"https://api.github.com/repos/nem0/imgui/subscribers","subscription_url":"https://api.github.com/repos/nem0/imgui/subscription","commits_url":"https://api.github.com/repos/nem0/imgui/commits{/sha}","git_commits_url":"https://api.github.com/repos/nem0/imgui/git/commits{/sha}","comments_url":"https://api.github.com/repos/nem0/imgui/comments{/number}","issue_comment_url":"https://api.github.com/repos/nem0/imgui/issues/comments{/number}","contents_url":"https://api.github.com/repos/nem0/imgui/contents/{+path}","compare_url":"https://api.github.com/repos/nem0/imgui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nem0/imgui/merges","archive_url":"https://api.github.com/repos/nem0/imgui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nem0/imgui/downloads","issues_url":"https://api.github.com/repos/nem0/imgui/issues{/number}","pulls_url":"https://api.github.com/repos/nem0/imgui/pulls{/number}","milestones_url":"https://api.github.com/repos/nem0/imgui/milestones{/number}","notifications_url":"https://api.github.com/repos/nem0/imgui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nem0/imgui/labels{/name}","releases_url":"https://api.github.com/repos/nem0/imgui/releases{/id}","created_at":"2015-09-19T19:08:51Z","updated_at":"2015-09-19T19:08:52Z","pushed_at":"2015-09-19T19:12:46Z","git_url":"git://github.com/nem0/imgui.git","ssh_url":"git@github.com:nem0/imgui.git","clone_url":"https://github.com/nem0/imgui.git","svn_url":"https://github.com/nem0/imgui","homepage":"","size":14129,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ocornut:master","ref":"master","sha":"774099918a02ae5e8c64f3674890247f481af5de","user":{"login":"ocornut","id":8225057,"avatar_url":"https://avatars.githubusercontent.com/u/8225057?v=3","gravatar_id":"","url":"https://api.github.com/users/ocornut","html_url":"https://github.com/ocornut","followers_url":"https://api.github.com/users/ocornut/followers","following_url":"https://api.github.com/users/ocornut/following{/other_user}","gists_url":"https://api.github.com/users/ocornut/gists{/gist_id}","starred_url":"https://api.github.com/users/ocornut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocornut/subscriptions","organizations_url":"https://api.github.com/users/ocornut/orgs","repos_url":"https://api.github.com/users/ocornut/repos","events_url":"https://api.github.com/users/ocornut/events{/privacy}","received_events_url":"https://api.github.com/users/ocornut/received_events","type":"User","site_admin":false},"repo":{"id":22067521,"name":"imgui","full_name":"ocornut/imgui","owner":{"login":"ocornut","id":8225057,"avatar_url":"https://avatars.githubusercontent.com/u/8225057?v=3","gravatar_id":"","url":"https://api.github.com/users/ocornut","html_url":"https://github.com/ocornut","followers_url":"https://api.github.com/users/ocornut/followers","following_url":"https://api.github.com/users/ocornut/following{/other_user}","gists_url":"https://api.github.com/users/ocornut/gists{/gist_id}","starred_url":"https://api.github.com/users/ocornut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocornut/subscriptions","organizations_url":"https://api.github.com/users/ocornut/orgs","repos_url":"https://api.github.com/users/ocornut/repos","events_url":"https://api.github.com/users/ocornut/events{/privacy}","received_events_url":"https://api.github.com/users/ocornut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ocornut/imgui","description":"Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies","fork":false,"url":"https://api.github.com/repos/ocornut/imgui","forks_url":"https://api.github.com/repos/ocornut/imgui/forks","keys_url":"https://api.github.com/repos/ocornut/imgui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocornut/imgui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocornut/imgui/teams","hooks_url":"https://api.github.com/repos/ocornut/imgui/hooks","issue_events_url":"https://api.github.com/repos/ocornut/imgui/issues/events{/number}","events_url":"https://api.github.com/repos/ocornut/imgui/events","assignees_url":"https://api.github.com/repos/ocornut/imgui/assignees{/user}","branches_url":"https://api.github.com/repos/ocornut/imgui/branches{/branch}","tags_url":"https://api.github.com/repos/ocornut/imgui/tags","blobs_url":"https://api.github.com/repos/ocornut/imgui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocornut/imgui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocornut/imgui/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocornut/imgui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocornut/imgui/statuses/{sha}","languages_url":"https://api.github.com/repos/ocornut/imgui/languages","stargazers_url":"https://api.github.com/repos/ocornut/imgui/stargazers","contributors_url":"https://api.github.com/repos/ocornut/imgui/contributors","subscribers_url":"https://api.github.com/repos/ocornut/imgui/subscribers","subscription_url":"https://api.github.com/repos/ocornut/imgui/subscription","commits_url":"https://api.github.com/repos/ocornut/imgui/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocornut/imgui/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocornut/imgui/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocornut/imgui/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocornut/imgui/contents/{+path}","compare_url":"https://api.github.com/repos/ocornut/imgui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocornut/imgui/merges","archive_url":"https://api.github.com/repos/ocornut/imgui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocornut/imgui/downloads","issues_url":"https://api.github.com/repos/ocornut/imgui/issues{/number}","pulls_url":"https://api.github.com/repos/ocornut/imgui/pulls{/number}","milestones_url":"https://api.github.com/repos/ocornut/imgui/milestones{/number}","notifications_url":"https://api.github.com/repos/ocornut/imgui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocornut/imgui/labels{/name}","releases_url":"https://api.github.com/repos/ocornut/imgui/releases{/id}","created_at":"2014-07-21T14:29:47Z","updated_at":"2015-09-19T19:31:29Z","pushed_at":"2015-09-20T09:26:14Z","git_url":"git://github.com/ocornut/imgui.git","ssh_url":"git@github.com:ocornut/imgui.git","clone_url":"https://github.com/ocornut/imgui.git","svn_url":"https://github.com/ocornut/imgui","homepage":"","size":14129,"stargazers_count":2134,"watchers_count":2134,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":199,"mirror_url":null,"open_issues_count":47,"forks":199,"open_issues":47,"watchers":2134,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ocornut/imgui/pulls/342"},"html":{"href":"https://github.com/ocornut/imgui/pull/342"},"issue":{"href":"https://api.github.com/repos/ocornut/imgui/issues/342"},"comments":{"href":"https://api.github.com/repos/ocornut/imgui/issues/342/comments"},"review_comments":{"href":"https://api.github.com/repos/ocornut/imgui/pulls/342/comments"},"review_comment":{"href":"https://api.github.com/repos/ocornut/imgui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ocornut/imgui/pulls/342/commits"},"statuses":{"href":"https://api.github.com/repos/ocornut/imgui/statuses/93200a6c370cd1e9606718ee286901cb82d135dd"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ocornut","id":8225057,"avatar_url":"https://avatars.githubusercontent.com/u/8225057?v=3","gravatar_id":"","url":"https://api.github.com/users/ocornut","html_url":"https://github.com/ocornut","followers_url":"https://api.github.com/users/ocornut/followers","following_url":"https://api.github.com/users/ocornut/following{/other_user}","gists_url":"https://api.github.com/users/ocornut/gists{/gist_id}","starred_url":"https://api.github.com/users/ocornut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocornut/subscriptions","organizations_url":"https://api.github.com/users/ocornut/orgs","repos_url":"https://api.github.com/users/ocornut/repos","events_url":"https://api.github.com/users/ocornut/events{/privacy}","received_events_url":"https://api.github.com/users/ocornut/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}