| 1018 | } |
| 1019 | |
| 1020 | double ap::randomreal() |
| 1021 | { |
| 1022 | int i1 = rand(); |
| 1023 | int i2 = rand(); |
| 1024 | while(i1==RAND_MAX) |
| 1025 | i1 =rand(); |
| 1026 | while(i2==RAND_MAX) |
| 1027 | i2 =rand(); |
| 1028 | double mx = RAND_MAX; |
| 1029 | return (i1+i2/mx)/mx; |
| 1030 | } |
| 1031 | |
| 1032 | int ap::randominteger(int maxv) |
| 1033 | { return rand()%maxv; } |
nothing calls this directly
no outgoing calls
no test coverage detected