libscratchcpp
A library for C++ based Scratch project players
Loading...
Searching...
No Matches
libscratchcpp::IRandomGenerator Class Referenceabstract

The IRandomGenerator interface represents a random number generator that can be received e. g. from an ExecutionContext. More...

#include <scratchcpp/irandomgenerator.h>

Public Member Functions

virtual ~IRandomGenerator ()
 
virtual long randint (long start, long end) const =0
 
virtual double randintDouble (double start, double end) const =0
 
virtual long randintExcept (long start, long end, long except) const =0
 

Detailed Description

The IRandomGenerator interface represents a random number generator that can be received e. g. from an ExecutionContext.

Constructor & Destructor Documentation

◆ ~IRandomGenerator()

virtual libscratchcpp::IRandomGenerator::~IRandomGenerator ( )
inlinevirtual

Member Function Documentation

◆ randint()

virtual long libscratchcpp::IRandomGenerator::randint ( long start,
long end ) const
pure virtual

Returns a random integer in the given range (inclusive).

◆ randintDouble()

virtual double libscratchcpp::IRandomGenerator::randintDouble ( double start,
double end ) const
pure virtual

Returns a random double in the given range (inclusive).

◆ randintExcept()

virtual long libscratchcpp::IRandomGenerator::randintExcept ( long start,
long end,
long except ) const
pure virtual

Returns a random integer in the given range (inclusive) except the given integer.


The documentation for this class was generated from the following file: