fix ran() function to give a random number even on the first run.

This commit is contained in:
Jim 2015-07-06 13:04:54 -07:00
parent 89d7787305
commit 4cc8836c33
3 changed files with 2 additions and 0 deletions

Binary file not shown.

View File

@ -437,10 +437,12 @@ void function(struct command *current,YabInterface* yab) /* performs a function
result=stNUMBER;
break;
case fRAN:
value=a1->value*((double)rand()/RAND_MAX);
value=a1->value*((double)rand()/RAND_MAX);
result=stNUMBER;
break;
case fRAN2:
value=(double)rand()/RAND_MAX;
value=(double)rand()/RAND_MAX;
result=stNUMBER;
break;

BIN
src/libyab.so Executable file

Binary file not shown.