magnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249unittest-saveload
Last change
on this file since f4e2f22 was
d85c194,
checked in by Piotr Rozyczko <piotr.rozyczko@…>, 9 years ago
|
Remaining modules refactored
|
-
Property mode set to
100644
|
File size:
218 bytes
|
Rev | Line | |
---|
[aa639ea] | 1 | /** \file myutil.cc */ |
---|
| 2 | #include <cstdlib> |
---|
| 3 | #include <ctime> |
---|
| 4 | #include "myutil.h" |
---|
| 5 | |
---|
| 6 | using namespace std; |
---|
| 7 | |
---|
| 8 | void seed_rnd() { |
---|
| 9 | srand((unsigned)time(NULL)); |
---|
| 10 | } |
---|
| 11 | |
---|
| 12 | double ran1() |
---|
| 13 | { |
---|
| 14 | return (double)rand() / (double) RAND_MAX; |
---|
| 15 | } |
---|
| 16 | |
---|
Note: See
TracBrowser
for help on using the repository browser.