MadMan2k
February 7th, 2007, 06:01 PM
Im currently trying to build an application written for an older version of boost, where uniform_real was defined like this:
http://www-eleves-isia.cma.fr/documentation/BoostDoc/boost_1_29_0/libs/random/random-distributions.html#uniform_real
the new API is this:
http://www.boost.org/libs/random/random-distributions.html#uniform_real
the code snippet is:
boost::uniform_real< rcss::random::DefaultRNG > dir( rcss::random::DefaultRNG::instance(),
-M_PI, +M_PI );
diff = Polar2PVector( post.r, dir() );
I changed it like this:
boost::uniform_real<> dir( -M_PI, +M_PI );
diff = Polar2PVector( post.r, dir(rcss::random::DefaultRNG::instance()) );
does it still do the same? I dont really understnand the c++ template syntax...
http://www-eleves-isia.cma.fr/documentation/BoostDoc/boost_1_29_0/libs/random/random-distributions.html#uniform_real
the new API is this:
http://www.boost.org/libs/random/random-distributions.html#uniform_real
the code snippet is:
boost::uniform_real< rcss::random::DefaultRNG > dir( rcss::random::DefaultRNG::instance(),
-M_PI, +M_PI );
diff = Polar2PVector( post.r, dir() );
I changed it like this:
boost::uniform_real<> dir( -M_PI, +M_PI );
diff = Polar2PVector( post.r, dir(rcss::random::DefaultRNG::instance()) );
does it still do the same? I dont really understnand the c++ template syntax...