Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
dcpp::IRandomizer Class Referenceabstract

Interface for generating random numbers. More...

#include <duckcpp/core/engine/IRandomizer.hpp>

Inheritance diagram for dcpp::IRandomizer:
Inheritance graph
Collaboration diagram for dcpp::IRandomizer:
Collaboration graph

Public Member Functions

virtual void reset (i32 value=0x0f0f0f0f)=0
 resets the randomizer
 
virtual i32 rand () const =0
 generates a pseudo random number in the range 0..randMax()
 
virtual f32 frand () const =0
 generates a pseudo random number in the range 0..1
 
virtual i32 randMax () const =0
 get maximum number generated by rand()
 
- Public Member Functions inherited from dcpp::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
i32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from dcpp::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Detailed Description

Interface for generating random numbers.

Member Function Documentation

◆ reset()

virtual void dcpp::IRandomizer::reset ( i32  value = 0x0f0f0f0f)
pure virtual

resets the randomizer

Parameters
valueInitialization value (seed)

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

Duckcpp    @cppfx.xyz