jeudi 4 août 2016

Same random within different bounds

enter image description here

How can I generate X amount of random numbers within bounds that match the set of values in the biggest box? (See image) So for the two smaller boxes I need to be able to make X amount of values within their bounds, but have these values linked somehow (Via seed maybe?) so that both boxes could get the same values if their bounds overlap (see highlighted yellow dot).

Note that there would be a few million (about 500 million) values in the big box, but I never actually need to get them (would be way too slow), only generate a few that are within the smaller bounds.

Answer Preferable in C# please.




Aucun commentaire:

Enregistrer un commentaire