richelbilderbeek / djog_unos_2018

Project by the Uno's at DJOG 2018-2019: Nature Zen
GNU General Public License v3.0
6 stars 2 forks source link

Improve RNG #567

Open richelbilderbeek opened 5 years ago

richelbilderbeek commented 5 years ago

Is your feature request related to a problem? Please describe.

Currently, we use std::rand and std::srand. There is a superior solution, to use a std::rng_engine and std::something_distribution.

Describe the solution you'd like

Describe alternatives you've considered

None.

Additional context

None.

richelbilderbeek commented 5 years ago

As Rob already uses this, I assign him.

robkruger commented 5 years ago

@richelbilderbeek The function returns different numbers on Travis, but 10 times the same on my laptop...?

printscreen

richelbilderbeek commented 5 years ago

Keiweird indeed!

Is the error still there, on your branch? If yes, I will ask a Thursday member to reproduce.

robkruger commented 5 years ago

Yeah, it's still there.

richelbilderbeek commented 5 years ago

Searching for std::rand, I still find some usages. Please replace those by calls to the RNG engine as well. Yes, you will need to pass that Mersienne twister class :+1:

robkruger commented 5 years ago

I think my branched stalled because of this, I deleted it and recreated it but this is lost because of that

janderkkotlarski commented 5 years ago

Could multiple seniors/mediors check whether my solution actually works on their computers?