LA_library/random.cc

13 lines
278 B
C++
Raw Normal View History

2023-11-17 21:57:28 +01:00
#include <stdlib.h>
#include "random.h"
namespace LA {
extern "C" {
WEAK_SYMBOL double randdouble() {return random()/(1.+RAND_MAX);}
WEAK_SYMBOL double randdoublesigned() {return 2.*random()/(1.+RAND_MAX)-1.;}
WEAK_SYMBOL int randint32() {return random();}
}
}//namespace