Mercurial > hg > octave-terminal
changeset 6326:129ef2ae319f
[project @ 2007-02-18 14:01:27 by dbateman]
author | dbateman |
---|---|
date | Sun, 18 Feb 2007 14:01:27 +0000 |
parents | 5e00f0993233 |
children | 4905c543b301 |
files | liboctave/ChangeLog liboctave/oct-rand.cc |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2007-02-18 David Bateman <dbateman@free.fr> + + * oct-rand.cc (do_old_initialization()): call setcgn(1) prior to + calling setall and reset to the current generator after. + 2007-02-16 John W. Eaton <jwe@octave.org> * oct-shlib.h (octave_shlib::relative): New data member.
--- a/liboctave/oct-rand.cc +++ b/liboctave/oct-rand.cc @@ -107,7 +107,9 @@ do_old_initialization (void) { octave_localtime tm; - + int stored_distribution = current_distribution; + F77_FUNC (setcgn, SETCGN) (uniform_dist); + int hour = tm.hour() + 1; int minute = tm.min() + 1; int second = tm.sec() + 1; @@ -119,6 +121,7 @@ s1 = force_to_fit_range (s1, 1, 2147483399); F77_FUNC (setall, SETALL) (s0, s1); + F77_FUNC (setcgn, SETCGN) (stored_distribution); old_initialized = true; }