Jump to content
Sign in to follow this  
scifer

How to generate negative random numbers

Recommended Posts

I'd like to generate a random number ranging from -10 to +10. How to do that?

Share this post


Link to post
Share on other sites

(random 20) - 10

Edited by .kju [PvPscene]

Share this post


Link to post
Share on other sites
(random 20) - 10

Thanx a lot :)

---------- Post added at 05:03 ---------- Previous post was at 05:01 ----------

Edit: slow

:confused:

Share this post


Link to post
Share on other sites

(random 20) - 10 ????

How about (random 10) - 20 :)

Share this post


Link to post
Share on other sites

random 10 = 0 - 10

0 - 10 minus 20 = -20 to -10

Share this post


Link to post
Share on other sites

(random 10) * -1

:o

Edited by el76

Share this post


Link to post
Share on other sites
random 10 = 0 - 10

0 - 10 minus 20 = -20 to -10

Yes, but you wrote "random (20) - 10", which is -10 to 10.

Share this post


Link to post
Share on other sites
I'd like to generate a random number ranging from -10 to +10. How to do that?
Yes, but you wrote "random (20) - 10", which is -10 to 10.

Exactly what scifer searched for. It´s better to close the topic now.... :D

Share this post


Link to post
Share on other sites
Exactly what scifer searched for. It´s better to close the topic now.... :D

God that's true. But it's sunday morning, so....yeah better close it :D

Share this post


Link to post
Share on other sites
random 10 = 0 - 10

0 - 10 minus 20 = -20 to -10

Oh yeah!! LOL!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×