Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: webrtc/test/random.h

Issue 1412183002: Fix off-by-one error in PRNG. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/test/random.cc » ('j') | webrtc/test/random.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/random.h
diff --git a/webrtc/test/random.h b/webrtc/test/random.h
index 9a0bc9e9532aae2b70673c72f4085e2961e66cb2..7568a1757c8165e6c2abac36f26769c4645448f1 100644
--- a/webrtc/test/random.h
+++ b/webrtc/test/random.h
@@ -11,6 +11,8 @@
#ifndef WEBRTC_TEST_RANDOM_H_
#define WEBRTC_TEST_RANDOM_H_
+#include <limits>
+
#include "webrtc/typedefs.h"
#include "webrtc/base/constructormagic.h"
@@ -25,7 +27,7 @@ class Random {
// Return pseudo-random number in the interval [0.0, 1.0].
pbos-webrtc 2015/10/19 15:22:21 Let's make this one [0.0, 1.0).
float Rand();
- // Return pseudo rounded random number in interval [low, high].
+ // Return pseudo-random number mapped to the interval [low, high].
int Rand(int low, int high);
// Normal Distribution.
« no previous file with comments | « no previous file | webrtc/test/random.cc » ('j') | webrtc/test/random.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698