lipsum-cpp 0.5.4
A basic library written in C++ for generating placeholder Lorem Ipsum text.
Loading...
Searching...
No Matches
lipsum::ArgVec2 Struct Reference

Store data for inputting into functions. More...

#include <argvec2.hpp>

Public Member Functions

 ArgVec2 (int min, int max)
 Constructor for ArgVec2.
int roll (std::mt19937 &gen, bool lazy=false) const
 Return a number between min and max.

Public Attributes

int min
 The minimum value.
int max
 The maximum value.

Detailed Description

Store data for inputting into functions.

Since
0.1.0

This struct stores values min and max, which are intended to be inputted into functions as arguments.

Constructor & Destructor Documentation

◆ ArgVec2()

lipsum::ArgVec2::ArgVec2 ( int min,
int max )

Constructor for ArgVec2.

Since
0.1.0
Parameters
minValue to enter into this->min
maxValue to enter into this->max

Member Function Documentation

◆ roll()

int lipsum::ArgVec2::roll ( std::mt19937 & gen,
bool lazy = false ) const
nodiscard

Return a number between min and max.

Since
0.1.0

This function returns a random value between min and max. Formerly known as lpsm::Generator::Roll().

Parameters
genThe generator to use.
lazyWhether to use "lazy" mode, i.e. using an average.
Returns
int The random number.

The documentation for this struct was generated from the following files: