Hello Everybody,
I wonder how to randomize a value between a fork of 2 values.
For example I want a radom value like that :
/obj/model/box1/sizey < my random value < /obj/model/box2/sizey
I want the value to always be in that fork without clamping to the max/min
Thanks in advance !
Julien
Randomizing a value
3736 4 0- Undertaker
- Member
- 113 posts
- Joined: July 2005
- Offline
- puma.snyder
- Member
- 121 posts
- Joined: July 2005
- Offline
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
Hi Undertaker,
Assuming that “my random value” is in the range , then you can try:
randval * (max-min) + min
or
fit01(randval,min,max)
(in both cases “randval” is the random number)
Cheers!
EDIT: Sheesh! This is the second time today that I post something at the same time as someone else … sorry Achim (that's it; no more posting for me today! )
Assuming that “my random value” is in the range , then you can try:
randval * (max-min) + min
or
fit01(randval,min,max)
(in both cases “randval” is the random number)
Cheers!
EDIT: Sheesh! This is the second time today that I post something at the same time as someone else … sorry Achim (that's it; no more posting for me today! )
Edited by - May 13, 2004 14:19:58
- deecue
- Member
- 412 posts
- Joined: July 2005
- Offline
- Undertaker
- Member
- 113 posts
- Joined: July 2005
- Offline
-
- Quick Links