projects
/
unix-history
/ blame
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blob
|
blame
(incremental) |
history
|
HEAD
BSD 1 development
[unix-history]
/
trek
/
ranf.c
Commit
Line
Data
520d5775
EA
1
ranf(max)
2
int max;
3
{
4
register int t;
5
6
if (max <= 0)
7
return (0);
8
t = rand() >> 5;
9
return (t % max);
10
}
11
12
13
double franf()
14
{
15
double t;
16
t = rand() & 077777;
17
return (t / 32767.0);
18
}