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

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: made Rand() interval exclusive of 1.0 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') | no next file with comments »
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..5cc54f212970c8269cf2093c199ef6be55fb4a45 100644
--- a/webrtc/test/random.h
+++ b/webrtc/test/random.h
@@ -22,10 +22,10 @@ class Random {
public:
explicit Random(uint32_t seed);
- // Return pseudo-random number in the interval [0.0, 1.0].
+ // Return pseudo-random number in the interval [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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698