Application of the identity matrix II. v05
Submitted By:
xhunga
Rating:





(
Rate It)
/* xkrndf.h freeware [[Email Removed]] */
/* ------------------------------ FUNCTION -------------------------- rnd0I() */
/*Call : time_t t; */
/* int i; */
/* */
/* srand(time(&t)); */
/* i = rnd0I(9); */
/* -------------------------------------------------------------------------- */
int rnd0I(
int maxI)
{
int x;
x = rand() % maxI;
if(x)
{
x *= -pow(-1,x);
}
return(x);
}
/* ------------------------------ FUNCTION -------------------------- rnd0I() */
/*Call : time_t t; */
/* int i; */
/* */
/* srand(time(&t)); */
/* i = rnd0I(9); */
/* -------------------------------------------------------------------------- */
int rndp0I(
int maxI)
{
return(rand() % maxI);
}
/* ------------------------------ FUNCTION --------------------------- rndI() */
/*Call : time_t t; */
/* int i; */
/* */
/* srand(time(&t)); */
/* i = rndI(9); */
/* -------------------------------------------------------------------------- */
int rndI(
int maxI)
{
int x;
x = (rand() % maxI) + 1;
x *= -pow(-1,x);
return(x);
}
/* ------------------------------ FUNCTION --------------------------- rndI() */
/*Call : time_t t; */
/* int i; */
/* */
/* srand(time(&t)); */
/* i = rndI(9); */
/* -------------------------------------------------------------------------- */
int rndpI(
int maxI)
{
return((rand() % maxI) + 1);
}