/*
 * $Id: rand1.txt 15102 2010-07-14 12:48:39Z vszakats $
 */

/*  $DOC$
 *  $FUNCNAME$
 *     FT_RAND1()
 *  $CATEGORY$
 *     Math
 *  $ONELINER$
 *     Generate a random number
 *  $SYNTAX$
 *     FT_RAND1( <nMax> ) -> nRand
 *  $ARGUMENTS$
 *     <nMax>  Maximum limit of value to be produced.
 *  $RETURNS$
 *     nRand is a random number between 0 (inclusive) and <nMax> (exclusive).
 *  $DESCRIPTION$
 *     Generates a non-integer random number based on the Linear
 *     Congruential Method.
 * 
 *     If you need a random number between 1 and <nMax> inclusive, INT()
 *     the result and add 1.
 * 
 *     If you need a random number between 0 and <nMax> inclusive,
 *     then you should ROUND() the result.
 *  $EXAMPLES$
 *      nResult := INT( FT_RAND1(100) ) + 1    // 1 <= nResult <= 100
 *      nResult := ROUND( FT_RAND1(100), 0 )   // 0 <= nResult <= 100
 *      nResult := FT_RAND1( 1 )               // 0 <= nResult < 1
 *  $END$
 */
