vendredi 16 novembre 2018

Is there're a way to seed Swift 4.2 random number generator

I like the new Swift 4.2 RandomNumberGenerator thing, but I don't see a seed possibility there. Am I missing something, or is there any way at all to seed these generators, by maybe calling an underlying low-level function? I have a lot of code, which uses default number generators on default number types, and I now need to make sure that everything behaves exactly the same between launches with as little code changes as possible.




Aucun commentaire:

Enregistrer un commentaire