https://github.com/daggilli/randomint
A very simple C++ class to provide pseudorandom integers.
https://github.com/daggilli/randomint
Last synced: 8 months ago
JSON representation
A very simple C++ class to provide pseudorandom integers.
- Host: GitHub
- URL: https://github.com/daggilli/randomint
- Owner: daggilli
- License: bsd-3-clause
- Created: 2025-10-07T20:29:08.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-10-07T20:48:23.000Z (8 months ago)
- Last Synced: 2025-10-07T22:29:48.743Z (8 months ago)
- Language: C++
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RANDOMINT
### Introduction
This is a very simple C++ class to provide a source of pseudorandom integers in a given range. The goal is for its usage to be a simple as possible. It is a header-only package.
### Requirements
A reasonably modern C++ compiler (C++17 or later).
### Installation
Clone the package, type `./CMAKE` in the project root and then `./INSTALL`. The header file, `randomint.hpp` will be installed in `/usr/local/include`.
### Usage
Include the header file
```c++
#include
```
Declare a generator
```c++
auto generator = RandomInt::RandomUint16Generator(1024,4096);
std::cout << generator() << "\n";
```
A very brief example of the salient points of usage is found in `src/test/main.cpp`.