Fortraneries/BloubWorld/mathstuff.f90

29 lines
720 B
Fortran
Raw Normal View History

2022-02-08 13:25:04 +01:00
module mathstuff
implicit none
contains
! ----------------------------------------------------------------
2022-02-16 15:59:42 +01:00
! really quick'n'dirty hack
2022-02-17 18:08:58 +01:00
! not working yet...
2022-02-08 13:25:04 +01:00
subroutine init_random_seed()
integer, dimension(3) :: tarray
2022-02-17 18:08:58 +01:00
integer :: t3
real :: dummy
2022-02-08 13:25:04 +01:00
call itime(tarray)
2022-02-17 13:41:09 +01:00
t3 = 3600*tarray(1) + 60*tarray(2) + tarray(3)
write(0, '(A,3I3,A,I6)') "sranding: ", tarray, " --> ", t3
2022-02-08 13:25:04 +01:00
call srand(t3)
2022-02-18 19:30:10 +01:00
! after initializing the random generator engine,
! you MUST use it for initializing the initializer
2022-02-17 18:08:58 +01:00
dummy = rand()
2022-02-08 13:25:04 +01:00
end subroutine
! ----------------------------------------------------------------
end module mathstuff