#include "Base/spStandard.hpp"#include "Base/spMaterialColor.hpp"#include "Base/spDimensionVector3D.hpp"Go to the source code of this file.
Namespaces | |
| namespace | sp |
!! | |
| namespace | sp::math |
This namespace contains all mathematical basic functions such as sine, cosine, distance calculations etc. | |
| namespace | sp::math::Randomizer |
Namepsace for all random-generation functions. | |
Functions | |
| SP_EXPORT void | sp::math::Randomizer::seedRandom (bool isTimeBase) |
| SP_EXPORT s32 | sp::math::Randomizer::randInt () |
| Returns a random value in the range [0 .. RAND_MAX]. | |
| SP_EXPORT s32 | sp::math::Randomizer::randInt (const s32 Max) |
| Returns a random value in the range [0 .. Max]. This value can also be negative. | |
| SP_EXPORT s32 | sp::math::Randomizer::randInt (const s32 Min, const s32 Max) |
| Returns a random value in the range [Min .. Max]. These values can also be negative. | |
| SP_EXPORT bool | sp::math::Randomizer::randBool (const u32 Probability) |
| Returns true if the specified probability occurs. This is equivalent to "randInt(Probability) == 0". | |
| SP_EXPORT f32 | sp::math::Randomizer::randFloat () |
| Returns a random value in the range [0.0 .. 1.0]. | |
| SP_EXPORT f32 | sp::math::Randomizer::randFloat (const f32 Max) |
| Returns a floating point random value in the range [0.0 .. Max]. | |
| SP_EXPORT f32 | sp::math::Randomizer::randFloat (const f32 Min, const f32 Max) |
| Returns a floating point random value in the range [Min .. Max]. | |
| SP_EXPORT video::color | sp::math::Randomizer::randColor (bool RandAlpha=false) |
| Returns a random color. If 'RandAlpha' is false, the alpha channel is always 255. | |
| SP_EXPORT dim::vector3df | sp::math::Randomizer::randVector () |
| Returns a random direction vector. This vector is always normalized. | |
1.7.1