vendredi 29 décembre 2017

Create a identical "random" float based on multiple data

I'm working on a game (Unity) and I need to create a random float value (between 0 and 1) based on multiple int and/or float.

I think it'll be more easy to manually create a single string for the function, but maybe it could accept a list of int and/or float.

Example of result:

  • "[5-91]-52-1" > 0.158756..

Important points:

  • The distribution of results (between 0 and 1) must be equals (don't want 90% of results between 0.45 and 0.55)
  • Asking 2 times for the same string must return the exact same result.
  • Results have no need to be unique.

Bonus Point:

  • Sometime I need that close similar string return close result, but not everytime. It's possible for "random generation" to handle a boolean with this feature ?



Aucun commentaire:

Enregistrer un commentaire