fix ran() function to give a random number even on the first run.
This commit is contained in:
parent
89d7787305
commit
4cc8836c33
Binary file not shown.
@ -437,10 +437,12 @@ void function(struct command *current,YabInterface* yab) /* performs a function
|
|||||||
result=stNUMBER;
|
result=stNUMBER;
|
||||||
break;
|
break;
|
||||||
case fRAN:
|
case fRAN:
|
||||||
|
value=a1->value*((double)rand()/RAND_MAX);
|
||||||
value=a1->value*((double)rand()/RAND_MAX);
|
value=a1->value*((double)rand()/RAND_MAX);
|
||||||
result=stNUMBER;
|
result=stNUMBER;
|
||||||
break;
|
break;
|
||||||
case fRAN2:
|
case fRAN2:
|
||||||
|
value=(double)rand()/RAND_MAX;
|
||||||
value=(double)rand()/RAND_MAX;
|
value=(double)rand()/RAND_MAX;
|
||||||
result=stNUMBER;
|
result=stNUMBER;
|
||||||
break;
|
break;
|
||||||
|
BIN
src/libyab.so
Executable file
BIN
src/libyab.so
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user