{"action":"created","comment":{"url":"https://api.github.com/repos/invio/Peddler/pulls/comments/205292290","pull_request_review_id":140534755,"id":205292290,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTI5MjI5MA==","diff_hunk":"@@ -0,0 +1,237 @@\n+using System;\n+using System.Collections.Generic;\n+using System.Threading;\n+\n+namespace Peddler {\n+    /// <summary>\n+    ///   An implementation of <see cref=\"IDistinctGenerator{Double}\" />.\n+    /// </summary>\n+    /// <inheritdoc />\n+    public class DoubleGenerator : IComparableGenerator<Double> {\n+        private static ThreadLocal<Random> random { get; } =\n+            new ThreadLocal<Random>(() => new Random());\n+\n+        private const Int32 EpsilonExponent = -323;\n+        private const Int32 MinimumIntervalExponentDelta = 16;\n+\n+        /// <summary>\n+        /// The minimum value to generate in calls to <see cref=\"Next()\" />. Defaults to\n+        /// <see cref=\"Double.MinValue\" />\n+        /// </summary>\n+        public Double Minimum { get; }\n+\n+        /// <summary>\n+        /// The maximum value to generate in calls to <see cref=\"Next()\" />. Defaults to\n+        /// <see cref=\"Double.MaxValue\" />.\n+        /// </summary>\n+        public Double Maximum { get; }\n+\n+        private Int32 defaultMinimumExponent { get; }\n+        private Int32 defaultMaximumExponent { get; }\n+        private List<(Int32, Int32)> defaultScales { get; }\n+\n+        /// <inheritdoc />\n+        public IEqualityComparer<Double> EqualityComparer => EqualityComparer<Double>.Default;\n+\n+        /// <inheritdoc />\n+        public IComparer<Double> Comparer => Comparer<Double>.Default;\n+\n+        /// <summary>\n+        ///\n+        /// </summary>\n+        public DoubleGenerator() : this(Double.MinValue, Double.MaxValue) {\n+        }\n+\n+        /// <summary>\n+        ///\n+        /// </summary>\n+        /// <param name=\"minimum\"></param>\n+        /// <param name=\"maximum\"></param>\n+        public DoubleGenerator(Double minimum, Double maximum) {\n+            this.Minimum = minimum;\n+            this.Maximum = maximum;\n+\n+            (this.defaultMinimumExponent, this.defaultMaximumExponent, this.defaultScales) =\n+                CalculateScales(minimum, maximum);\n+        }\n+\n+        /// <inheritdoc />\n+        public Double Next() {\n+            return Next(\n+                Minimum,\n+                Maximum,\n+                this.defaultScales,\n+                this.defaultMinimumExponent,\n+                this.defaultMaximumExponent\n+            );\n+        }\n+\n+        /// <inheritdoc />\n+        public Double NextDistinct(Double other) {\n+            Double result;\n+            do {\n+                result = this.Next();\n+            } while (EqualityComparer.Equals(other, result));\n+\n+            return result;\n+        }\n+\n+        /// <inheritdoc />\n+        public Double NextGreaterThan(Double other) {\n+            // The minimum interval between floating point numbers gets larger as the values get\n+            // larger.\n+            var minInterval =\n+                (Double)Math.Pow(\n+                    10,\n+                    Math.Max(EpsilonExponent, Math.Log10(Math.Abs(other)) - MinimumIntervalExponentDelta)","path":"src/Peddler/DoubleGenerator.cs","position":86,"original_position":86,"commit_id":"79e3a50e4c24be820c83bf03c0a0794e8dc8988f","original_commit_id":"79e3a50e4c24be820c83bf03c0a0794e8dc8988f","user":{"login":"carusology","id":19539318,"node_id":"MDQ6VXNlcjE5NTM5MzE4","avatar_url":"https://avatars1.githubusercontent.com/u/19539318?v=4","gravatar_id":"","url":"https://api.github.com/users/carusology","html_url":"https://github.com/carusology","followers_url":"https://api.github.com/users/carusology/followers","following_url":"https://api.github.com/users/carusology/following{/other_user}","gists_url":"https://api.github.com/users/carusology/gists{/gist_id}","starred_url":"https://api.github.com/users/carusology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carusology/subscriptions","organizations_url":"https://api.github.com/users/carusology/orgs","repos_url":"https://api.github.com/users/carusology/repos","events_url":"https://api.github.com/users/carusology/events{/privacy}","received_events_url":"https://api.github.com/users/carusology/received_events","type":"User","site_admin":false},"body":"I would include the how and the why of this opinionated implementation over a more naive `range * random.NextDouble()` implementation in a `<remarks></remarks>` section either at the top of the class.","created_at":"2018-07-25T23:30:33Z","updated_at":"2018-07-25T23:44:12Z","html_url":"https://github.com/invio/Peddler/pull/54#discussion_r205292290","pull_request_url":"https://api.github.com/repos/invio/Peddler/pulls/54","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/invio/Peddler/pulls/comments/205292290"},"html":{"href":"https://github.com/invio/Peddler/pull/54#discussion_r205292290"},"pull_request":{"href":"https://api.github.com/repos/invio/Peddler/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/invio/Peddler/pulls/54","id":203982889,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzOTgyODg5","html_url":"https://github.com/invio/Peddler/pull/54","diff_url":"https://github.com/invio/Peddler/pull/54.diff","patch_url":"https://github.com/invio/Peddler/pull/54.patch","issue_url":"https://api.github.com/repos/invio/Peddler/issues/54","number":54,"state":"open","locked":false,"title":"Implemented SingleGenerator and DoubleGenerator.","user":{"login":"sflanker","id":940246,"node_id":"MDQ6VXNlcjk0MDI0Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/940246?v=4","gravatar_id":"","url":"https://api.github.com/users/sflanker","html_url":"https://github.com/sflanker","followers_url":"https://api.github.com/users/sflanker/followers","following_url":"https://api.github.com/users/sflanker/following{/other_user}","gists_url":"https://api.github.com/users/sflanker/gists{/gist_id}","starred_url":"https://api.github.com/users/sflanker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sflanker/subscriptions","organizations_url":"https://api.github.com/users/sflanker/orgs","repos_url":"https://api.github.com/users/sflanker/repos","events_url":"https://api.github.com/users/sflanker/events{/privacy}","received_events_url":"https://api.github.com/users/sflanker/received_events","type":"User","site_admin":false},"body":"Closes #17 ","created_at":"2018-07-25T22:39:09Z","updated_at":"2018-07-25T23:44:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a81dfc4940a81ad4c244a61dfacadc3fc9005b6a","assignee":{"login":"sflanker","id":940246,"node_id":"MDQ6VXNlcjk0MDI0Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/940246?v=4","gravatar_id":"","url":"https://api.github.com/users/sflanker","html_url":"https://github.com/sflanker","followers_url":"https://api.github.com/users/sflanker/followers","following_url":"https://api.github.com/users/sflanker/following{/other_user}","gists_url":"https://api.github.com/users/sflanker/gists{/gist_id}","starred_url":"https://api.github.com/users/sflanker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sflanker/subscriptions","organizations_url":"https://api.github.com/users/sflanker/orgs","repos_url":"https://api.github.com/users/sflanker/repos","events_url":"https://api.github.com/users/sflanker/events{/privacy}","received_events_url":"https://api.github.com/users/sflanker/received_events","type":"User","site_admin":false},"assignees":[{"login":"sflanker","id":940246,"node_id":"MDQ6VXNlcjk0MDI0Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/940246?v=4","gravatar_id":"","url":"https://api.github.com/users/sflanker","html_url":"https://github.com/sflanker","followers_url":"https://api.github.com/users/sflanker/followers","following_url":"https://api.github.com/users/sflanker/following{/other_user}","gists_url":"https://api.github.com/users/sflanker/gists{/gist_id}","starred_url":"https://api.github.com/users/sflanker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sflanker/subscriptions","organizations_url":"https://api.github.com/users/sflanker/orgs","repos_url":"https://api.github.com/users/sflanker/repos","events_url":"https://api.github.com/users/sflanker/events{/privacy}","received_events_url":"https://api.github.com/users/sflanker/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":432677678,"node_id":"MDU6TGFiZWw0MzI2Nzc2Nzg=","url":"https://api.github.com/repos/invio/Peddler/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/invio/Peddler/pulls/54/commits","review_comments_url":"https://api.github.com/repos/invio/Peddler/pulls/54/comments","review_comment_url":"https://api.github.com/repos/invio/Peddler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/invio/Peddler/issues/54/comments","statuses_url":"https://api.github.com/repos/invio/Peddler/statuses/79e3a50e4c24be820c83bf03c0a0794e8dc8988f","head":{"label":"invio:floating-point-generators","ref":"floating-point-generators","sha":"79e3a50e4c24be820c83bf03c0a0794e8dc8988f","user":{"login":"invio","id":21130997,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTMwOTk3","avatar_url":"https://avatars3.githubusercontent.com/u/21130997?v=4","gravatar_id":"","url":"https://api.github.com/users/invio","html_url":"https://github.com/invio","followers_url":"https://api.github.com/users/invio/followers","following_url":"https://api.github.com/users/invio/following{/other_user}","gists_url":"https://api.github.com/users/invio/gists{/gist_id}","starred_url":"https://api.github.com/users/invio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/invio/subscriptions","organizations_url":"https://api.github.com/users/invio/orgs","repos_url":"https://api.github.com/users/invio/repos","events_url":"https://api.github.com/users/invio/events{/privacy}","received_events_url":"https://api.github.com/users/invio/received_events","type":"Organization","site_admin":false},"repo":{"id":66812799,"node_id":"MDEwOlJlcG9zaXRvcnk2NjgxMjc5OQ==","name":"Peddler","full_name":"invio/Peddler","owner":{"login":"invio","id":21130997,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTMwOTk3","avatar_url":"https://avatars3.githubusercontent.com/u/21130997?v=4","gravatar_id":"","url":"https://api.github.com/users/invio","html_url":"https://github.com/invio","followers_url":"https://api.github.com/users/invio/followers","following_url":"https://api.github.com/users/invio/following{/other_user}","gists_url":"https://api.github.com/users/invio/gists{/gist_id}","starred_url":"https://api.github.com/users/invio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/invio/subscriptions","organizations_url":"https://api.github.com/users/invio/orgs","repos_url":"https://api.github.com/users/invio/repos","events_url":"https://api.github.com/users/invio/events{/privacy}","received_events_url":"https://api.github.com/users/invio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/invio/Peddler","description":"Data Generation for .NET","fork":false,"url":"https://api.github.com/repos/invio/Peddler","forks_url":"https://api.github.com/repos/invio/Peddler/forks","keys_url":"https://api.github.com/repos/invio/Peddler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/invio/Peddler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/invio/Peddler/teams","hooks_url":"https://api.github.com/repos/invio/Peddler/hooks","issue_events_url":"https://api.github.com/repos/invio/Peddler/issues/events{/number}","events_url":"https://api.github.com/repos/invio/Peddler/events","assignees_url":"https://api.github.com/repos/invio/Peddler/assignees{/user}","branches_url":"https://api.github.com/repos/invio/Peddler/branches{/branch}","tags_url":"https://api.github.com/repos/invio/Peddler/tags","blobs_url":"https://api.github.com/repos/invio/Peddler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/invio/Peddler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/invio/Peddler/git/refs{/sha}","trees_url":"https://api.github.com/repos/invio/Peddler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/invio/Peddler/statuses/{sha}","languages_url":"https://api.github.com/repos/invio/Peddler/languages","stargazers_url":"https://api.github.com/repos/invio/Peddler/stargazers","contributors_url":"https://api.github.com/repos/invio/Peddler/contributors","subscribers_url":"https://api.github.com/repos/invio/Peddler/subscribers","subscription_url":"https://api.github.com/repos/invio/Peddler/subscription","commits_url":"https://api.github.com/repos/invio/Peddler/commits{/sha}","git_commits_url":"https://api.github.com/repos/invio/Peddler/git/commits{/sha}","comments_url":"https://api.github.com/repos/invio/Peddler/comments{/number}","issue_comment_url":"https://api.github.com/repos/invio/Peddler/issues/comments{/number}","contents_url":"https://api.github.com/repos/invio/Peddler/contents/{+path}","compare_url":"https://api.github.com/repos/invio/Peddler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/invio/Peddler/merges","archive_url":"https://api.github.com/repos/invio/Peddler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/invio/Peddler/downloads","issues_url":"https://api.github.com/repos/invio/Peddler/issues{/number}","pulls_url":"https://api.github.com/repos/invio/Peddler/pulls{/number}","milestones_url":"https://api.github.com/repos/invio/Peddler/milestones{/number}","notifications_url":"https://api.github.com/repos/invio/Peddler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/invio/Peddler/labels{/name}","releases_url":"https://api.github.com/repos/invio/Peddler/releases{/id}","deployments_url":"https://api.github.com/repos/invio/Peddler/deployments","created_at":"2016-08-29T05:03:28Z","updated_at":"2018-06-08T19:11:15Z","pushed_at":"2018-07-25T22:39:09Z","git_url":"git://github.com/invio/Peddler.git","ssh_url":"git@github.com:invio/Peddler.git","clone_url":"https://github.com/invio/Peddler.git","svn_url":"https://github.com/invio/Peddler","homepage":null,"size":177,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"invio:master","ref":"master","sha":"776891f419c31bee6ab894b6a5cb4b4594bbe2b1","user":{"login":"invio","id":21130997,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTMwOTk3","avatar_url":"https://avatars3.githubusercontent.com/u/21130997?v=4","gravatar_id":"","url":"https://api.github.com/users/invio","html_url":"https://github.com/invio","followers_url":"https://api.github.com/users/invio/followers","following_url":"https://api.github.com/users/invio/following{/other_user}","gists_url":"https://api.github.com/users/invio/gists{/gist_id}","starred_url":"https://api.github.com/users/invio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/invio/subscriptions","organizations_url":"https://api.github.com/users/invio/orgs","repos_url":"https://api.github.com/users/invio/repos","events_url":"https://api.github.com/users/invio/events{/privacy}","received_events_url":"https://api.github.com/users/invio/received_events","type":"Organization","site_admin":false},"repo":{"id":66812799,"node_id":"MDEwOlJlcG9zaXRvcnk2NjgxMjc5OQ==","name":"Peddler","full_name":"invio/Peddler","owner":{"login":"invio","id":21130997,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTMwOTk3","avatar_url":"https://avatars3.githubusercontent.com/u/21130997?v=4","gravatar_id":"","url":"https://api.github.com/users/invio","html_url":"https://github.com/invio","followers_url":"https://api.github.com/users/invio/followers","following_url":"https://api.github.com/users/invio/following{/other_user}","gists_url":"https://api.github.com/users/invio/gists{/gist_id}","starred_url":"https://api.github.com/users/invio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/invio/subscriptions","organizations_url":"https://api.github.com/users/invio/orgs","repos_url":"https://api.github.com/users/invio/repos","events_url":"https://api.github.com/users/invio/events{/privacy}","received_events_url":"https://api.github.com/users/invio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/invio/Peddler","description":"Data Generation for .NET","fork":false,"url":"https://api.github.com/repos/invio/Peddler","forks_url":"https://api.github.com/repos/invio/Peddler/forks","keys_url":"https://api.github.com/repos/invio/Peddler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/invio/Peddler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/invio/Peddler/teams","hooks_url":"https://api.github.com/repos/invio/Peddler/hooks","issue_events_url":"https://api.github.com/repos/invio/Peddler/issues/events{/number}","events_url":"https://api.github.com/repos/invio/Peddler/events","assignees_url":"https://api.github.com/repos/invio/Peddler/assignees{/user}","branches_url":"https://api.github.com/repos/invio/Peddler/branches{/branch}","tags_url":"https://api.github.com/repos/invio/Peddler/tags","blobs_url":"https://api.github.com/repos/invio/Peddler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/invio/Peddler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/invio/Peddler/git/refs{/sha}","trees_url":"https://api.github.com/repos/invio/Peddler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/invio/Peddler/statuses/{sha}","languages_url":"https://api.github.com/repos/invio/Peddler/languages","stargazers_url":"https://api.github.com/repos/invio/Peddler/stargazers","contributors_url":"https://api.github.com/repos/invio/Peddler/contributors","subscribers_url":"https://api.github.com/repos/invio/Peddler/subscribers","subscription_url":"https://api.github.com/repos/invio/Peddler/subscription","commits_url":"https://api.github.com/repos/invio/Peddler/commits{/sha}","git_commits_url":"https://api.github.com/repos/invio/Peddler/git/commits{/sha}","comments_url":"https://api.github.com/repos/invio/Peddler/comments{/number}","issue_comment_url":"https://api.github.com/repos/invio/Peddler/issues/comments{/number}","contents_url":"https://api.github.com/repos/invio/Peddler/contents/{+path}","compare_url":"https://api.github.com/repos/invio/Peddler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/invio/Peddler/merges","archive_url":"https://api.github.com/repos/invio/Peddler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/invio/Peddler/downloads","issues_url":"https://api.github.com/repos/invio/Peddler/issues{/number}","pulls_url":"https://api.github.com/repos/invio/Peddler/pulls{/number}","milestones_url":"https://api.github.com/repos/invio/Peddler/milestones{/number}","notifications_url":"https://api.github.com/repos/invio/Peddler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/invio/Peddler/labels{/name}","releases_url":"https://api.github.com/repos/invio/Peddler/releases{/id}","deployments_url":"https://api.github.com/repos/invio/Peddler/deployments","created_at":"2016-08-29T05:03:28Z","updated_at":"2018-06-08T19:11:15Z","pushed_at":"2018-07-25T22:39:09Z","git_url":"git://github.com/invio/Peddler.git","ssh_url":"git@github.com:invio/Peddler.git","clone_url":"https://github.com/invio/Peddler.git","svn_url":"https://github.com/invio/Peddler","homepage":null,"size":177,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/invio/Peddler/pulls/54"},"html":{"href":"https://github.com/invio/Peddler/pull/54"},"issue":{"href":"https://api.github.com/repos/invio/Peddler/issues/54"},"comments":{"href":"https://api.github.com/repos/invio/Peddler/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/invio/Peddler/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/invio/Peddler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/invio/Peddler/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/invio/Peddler/statuses/79e3a50e4c24be820c83bf03c0a0794e8dc8988f"}},"author_association":"NONE"}}
{"actor":{"display_login":"carusology"}}