How to set a minimum random number in REBOL? -


i'm executing code , waiting somewhere between 1 second , 1 minute. i'm using random 0:01:00 /seed need able set floor waiting between 30 seconds , 1 minute.

if want 0:0:30 minimum , 0:1:0 maximum, try formula:

0:0:29 + random 0:0:31 

this formula yields "discretely distributed (pseudo)random value". if want "continuously distributed (pseudo) random value", can use (just in r3) formula:

0:0:30 + random 30.0 

r2 not have native support "continuously distributed (pseudo)random values".


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -