File: randtest.cpp

package info (click to toggle)
maelstrom 1.4.3-L2.0.6-13
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 4,352 kB
  • ctags: 2,231
  • sloc: cpp: 22,044; ansic: 1,853; sh: 242; makefile: 223
file content (15 lines) | stat: -rw-r--r-- 295 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

/* Just a simple thing to test FastRandom() across different architectures */

#include "fastrand.cc"

main()
{
	SeedRandom(1L);
	while ( 1 ) {
		printf(" ( 2 : %hd ) ", FastRandom(2));
		printf(" ( 3 : %hd ) ", FastRandom(3));
		printf(" ( 3600 : %hd )\n", FastRandom(3600));
		sleep(1);
	}
}