yupplemayham/YuppleMayham/include/util.h
Ethan Adams 3075a01b3d Sorted header files under include
made Script base class for AIScript and eventually WeaponScript
2024-06-22 23:01:50 -04:00

26 lines
No EOL
429 B
C++

#ifndef _H_UTIL_H
#define _H_UTIL_H
#include <SDL_video.h>
#include <random>
namespace UTIL
{
void flip_surface(SDL_Surface* surface);
class RandomGenerator
{
public:
RandomGenerator(float min, float max) :
rd(),
gen(rd()),
dist(min, max) {};
float genFloat() { return dist(gen); }
private:
std::random_device rd;
std::mt19937 gen;
std::uniform_real_distribution<float> dist;
};
}
#endif // _H_UTIL_H