* Generates random float between (0, 1) non-inclusive, updating `rand_state`. * * Postcondition: pass `checkRandState()`, i.e. rand_state > 0 and is an integer.
()
| 139 | * Postcondition: pass `checkRandState()`, i.e. rand_state > 0 and is an integer. |
| 140 | */ |
| 141 | randomFloat(): number { |
| 142 | return this.nextInt() / this.modulus; |
| 143 | } |
| 144 | |
| 145 | private checkRandState(): void { |
| 146 | if (this.rand_state <= 0) { |
no test coverage detected