*/
Check out and contribute to CodePedia, the wiki for developers.
*/

View \xrndf.h

Application of the identity matrix II. v05

Submitted By: xhunga
Rating: starstar (Rate It)


/* xkrndf.h                   freeware                     [[Email Removed]]  */

/* ------------------------------ FUNCTION --------------------------- rndF() */
/*Call :   time_t t;                                                          */
/*       fraction f;                                                          */
/*                                                                            */
/*        srand(time(&t));                                                    */
/*           f = rndF(9,9);                                                   */
/* -------------------------------------------------------------------------- */
fraction rndF(int maxNumer, int maxDenom)
{
fraction f;

    f.numer  = rndI (maxNumer);
    f.denom  = rndpI(maxDenom);

 return(miniF(f));
}

/* ------------------------------ FUNCTION --------------------------- rndF() */
/*Call :   time_t t;                                                          */
/*       fraction f;                                                          */
/*                                                                            */
/*        srand(time(&t));                                                    */
/*           f = rndF(9,9);                                                   */
/* -------------------------------------------------------------------------- */
fraction rndFI(
int maxNumer
)
{
fraction f;

    f.numer  = rndI (maxNumer);
    f.denom  = 1;

 return(f);
}

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.