randomnumber.h
// Copyright (c) 1999-2018 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_RANDOMNUMBER_H
#define RUDIMENTS_RANDOMNUMBER_H
#include <rudiments/private/randomnumberincludes.h>
class RUDIMENTS_DLLSPEC randomnumber {
public:
randomnumber();
~randomnumber();
bool setSeed(uint32_t seed);
bool generateNumber(uint32_t *result);
bool generateScaledNumber(int32_t lower,
int32_t upper,
int32_t *result);
static uint32_t getSeed();
static uint32_t generateNumber(uint32_t seed);
static int32_t generateScaledNumber(uint32_t seed,
int32_t lower,
int32_t upper);
static int32_t scaleNumber(uint32_t number,
int32_t lower,
int32_t upper);
static uint32_t getRandMax();
static bool needsMutex();
static void setMutex(threadmutex *mtx);
#include <rudiments/private/randomnumber.h>
};
#endif
randomnumber
Definition: randomnumber.h:31
randomnumber::setMutex
static void setMutex(threadmutex *mtx)
randomnumber::generateNumber
bool generateNumber(uint32_t *result)
randomnumber::generateNumber
static uint32_t generateNumber(uint32_t seed)
randomnumber::generateScaledNumber
bool generateScaledNumber(int32_t lower, int32_t upper, int32_t *result)
randomnumber::scaleNumber
static int32_t scaleNumber(uint32_t number, int32_t lower, int32_t upper)
randomnumber::~randomnumber
~randomnumber()
randomnumber::getRandMax
static uint32_t getRandMax()
randomnumber::needsMutex
static bool needsMutex()
randomnumber::randomnumber
randomnumber()
randomnumber::getSeed
static uint32_t getSeed()
randomnumber::setSeed
bool setSeed(uint32_t seed)
randomnumber::generateScaledNumber
static int32_t generateScaledNumber(uint32_t seed, int32_t lower, int32_t upper)
threadmutex
Definition: threadmutex.h:11