Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Random number between -1 and 1
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01387218
Message ID:
01387223
Vues:
47
>I've used the example from help on how to generate random numbers. Now I need a random number between -1 and 1 (integer -1,0,1) and cannot figure out how to modify the example to give negative and positive numbers. Any tips?

If you are able to modify the code to give you random numbers between 0 and 2 (0, 1,2), then just subtract 1 from the result and you have random number between -1 and 1 (-1,0,1).
Otherwise post your current code and I (or someone else) will take a look at it.
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform