91
General discussions / Re: SFML 2.2 tagged in repository
« on: December 11, 2014, 11:51:25 am »
Great News! Looking forward to use it.
Keep up the works guys!
Keep up the works guys!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
The fact alone that it's based on Java drops my interest significantly.
Taken from stack overflowI use this algorithm to generate random numbers, works like it should.
--
#include <random>
#include <chrono>
unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
std::mt19937 rng(seed);
std::uniform_int_distribution<int> gen(min, max); // uniform, unbiased
int r = gen(rng);
Thanks for the quick answer .
I was thinking about passing the World through Context to my stacked up NewPlaneState... but it smells a little bit of sulphur...
This, of course, does not apply to const-references
I agree that it's useless as part of the interface, but it can sometimes be useful to do it in the implementation.
Like so:void someFunc(int i);
void someFunc(const int i)
{
... do stuff involving 'i' ...
}