9
3

my_rnd.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /* Copyright (C) 2013 Monty Program Ab
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; version 2 or later of the License.
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License
  10. along with this program; if not, write to the Free Software
  11. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
  12. #ifndef _my_rnd_h
  13. #define _my_rnd_h
  14. C_MODE_START
  15. struct my_rnd_struct {
  16. unsigned long seed1,seed2,max_value;
  17. double max_value_dbl;
  18. };
  19. void my_rnd_init(struct my_rnd_struct *rand_st, ulong seed1, ulong seed2);
  20. double my_rnd(struct my_rnd_struct *rand_st);
  21. double my_rnd_ssl(struct my_rnd_struct *rand_st);
  22. C_MODE_END
  23. #endif /* _my_rnd_h */