test/acm_random: add bit entropy comment to Rand15/16
the reason to use the high bits is the same as Rand12() and Rand8()
Change-Id: Iea960a0d433fc2417d0738d39ef94f3c9fc717cc
diff --git a/test/acm_random.h b/test/acm_random.h
index 1025e84..bc38ba4 100644
--- a/test/acm_random.h
+++ b/test/acm_random.h
@@ -34,6 +34,7 @@
uint16_t Rand16() {
const uint32_t value =
random_.Generate(testing::internal::Random::kMaxRange);
+ // There's a bit more entropy in the upper bits of this implementation.
return (value >> 15) & 0xffff;
}
@@ -42,6 +43,7 @@
int16_t Rand15() {
const uint32_t value =
random_.Generate(testing::internal::Random::kMaxRange);
+ // There's a bit more entropy in the upper bits of this implementation.
return (value >> 16) & 0x7fff;
}