Explicit cast and correction in wifi/RandomStream

This commit is contained in:
Raj Bhattacharjea
2009-01-29 12:25:25 -05:00
parent 8c1b14ba99
commit 20ddca38d6

View File

@@ -20,6 +20,8 @@
#include "random-stream.h"
#include "ns3/assert.h"
#include <cmath>
namespace ns3 {
RandomStream::~RandomStream ()
@@ -32,7 +34,7 @@ RealRandomStream::RealRandomStream ()
uint32_t
RealRandomStream::GetNext (uint32_t min, uint32_t max)
{
return m_stream.GetValue (min, max);
return static_cast<uint32_t> (round (m_stream.GetValue (min, max)));
}