1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)ranf.c	5.1 (Berkeley) 5/30/85";
   9: #endif not lint
  10: 
  11: # include   <stdio.h>
  12: 
  13: ranf(max)
  14: int max;
  15: {
  16:     register int    t;
  17: 
  18:     if (max <= 0)
  19:         return (0);
  20:     t = rand() >> 5;
  21:     return (t % max);
  22: }
  23: 
  24: 
  25: double franf()
  26: {
  27:     double      t;
  28:     t = rand() & 077777;
  29:     return (t / 32767.0);
  30: }

Defined functions

Defined variables

sccsid defined in line 8; never used
Last modified: 1985-05-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1812
Valid CSS Valid XHTML 1.0 Strict