Fortraneries/BloubWorld/mathstuff.f90

29 lines
720 B
Fortran
Raw Normal View History

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