| 88 | } |
| 89 | |
| 90 | float RandomFloat (float from, float to) |
| 91 | { |
| 92 | // this function returns a random floating-point number between (and including) |
| 93 | // the starting and ending values passed by parameters from and to. |
| 94 | |
| 95 | if (to <= from) |
| 96 | return (from); |
| 97 | |
| 98 | return (from + (float) lrand () / ((float) LRAND_MAX / (to - from))); |
| 99 | } |
| 100 | |
| 101 | // End random functions |
| 102 |
no test coverage detected