LA_library/la_random.h

32 lines
542 B
C
Raw Normal View History

2023-11-17 22:39:39 +01:00
#ifndef _LA_RANDOM_H
#define _LA_RANDOM_H
2023-11-17 21:57:28 +01:00
namespace LA {
extern double randdouble();
extern double randdoublesigned();
extern int randint32();
2023-11-17 21:57:28 +01:00
//RANDOM numbers defaulting to standard library but switchable to user's functions
#ifndef RANDDOUBLE
#define RANDDOUBLE LA::randdouble
2023-11-17 21:57:28 +01:00
#endif
#ifndef RANDDOUBLESIGNED
#define RANDDOUBLESIGNED LA::randdoublesigned
2023-11-17 21:57:28 +01:00
#endif
#ifndef RANDINT32
#define RANDINT32 LA::randint32
2023-11-17 21:57:28 +01:00
#endif
#ifdef __GNUC__
#define WEAK_SYMBOL __attribute__((weak))
#else
#define WEAK_SYMBOL
#endif
}//namespace
#endif