forked from KolibriOS/kolibrios
Mathematical functions are added some.
It is added makefile for compilation of programs under KolibriOS with the help gcc. git-svn-id: svn://kolibrios.org@696 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
15
programs/develop/ktcc/trunk/libc/stdlib/random.c
Normal file
15
programs/develop/ktcc/trunk/libc/stdlib/random.c
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
#include "stdlib.h"
|
||||
|
||||
unsigned int seed_o=1;
|
||||
|
||||
void srand (unsigned int seed)
|
||||
{
|
||||
seed_o=seed;
|
||||
}
|
||||
|
||||
int rand (void)
|
||||
{
|
||||
seed_o=(seed_o*25173+13849) & (65535);
|
||||
return(seed_o);
|
||||
}
|
Reference in New Issue
Block a user