source: trunk/anuga_core/source/anuga/fit_interpolate/rand48.c @ 8969

Last change on this file since 8969 was 8698, checked in by steve, 12 years ago

rand48.c is added so that it is available in windows

File size: 820 bytes
Line 
1/* ========================================================================== */
2/* === MATLAB/rand48.c ====================================================== */
3/* ========================================================================== */
4
5/* METIS uses drand48 and srand48, which conform to the SVID standard.  The
6 * lcc compiler for Windows shipped with MATLAB does not include the drand48
7 * and srand48 routines.  This file is a cheap replacement using the
8 * more-common rand and srand instead (which lcc does have).
9 *
10 * This file is only used when compiling CHOLMOD with the cholmod_make.m,
11 * on the PC, with the lcc compiler.
12 */
13
14#include <stdlib.h>
15
16double drand48 (void)
17{
18    return (((double) (rand ( ))) / ((double) RAND_MAX)) ;
19}
20
21void srand48 (long int seed)
22{
23    srand ((unsigned int) seed) ;
24}
Note: See TracBrowser for help on using the repository browser.