Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IRandomizer.hpp
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in duckcpp/duckcpp.hpp
4
5#ifndef DCPP_I_RANDOMIZER_HPP_INCLUDED
6#define DCPP_I_RANDOMIZER_HPP_INCLUDED
7
8#include <duckcpp/core/engine/IReferenceCounted.hpp>
9
10namespace dcpp
11{
12
14class IRandomizer : public virtual IReferenceCounted
15{
16public:
18
19 virtual void reset(dcpp::int32_kt value=0x0f0f0f0f) =0;
20
22 virtual dcpp::int32_kt rand() const =0;
23
25 virtual dcpp::float32_kt frand() const =0;
26
28 virtual dcpp::int32_kt randMax() const =0;
29};
30
31} // end namespace dcpp
32
33#endif
Interface for generating random numbers.
Definition IRandomizer.hpp:15
virtual void reset(dcpp::int32_kt value=0x0f0f0f0f)=0
resets the randomizer
virtual dcpp::float32_kt frand() const =0
generates a pseudo random number in the range 0..1
virtual dcpp::int32_kt randMax() const =0
get maximum number generated by rand()
virtual dcpp::int32_kt rand() const =0
generates a pseudo random number in the range 0..randMax()
Base class of most objects of the Duckcpp Engine.
Definition IReferenceCounted.hpp:46
As of Duckcpp 1.6, position2d is a synonym for vector2d.
Definition shared_device.hpp:34
float float32_kt
32 bit floating point variable.
Definition irrTypes.hpp:108
signed int int32_kt
32 bit signed variable.
Definition irrTypes.hpp:72

Duckcpp    @cppfx.xyz