版本

menu_open
Wwise SDK 2024.1.0

#include <AkRng.h>

Public 成员函数

 CAkRng (AkUInt64 uSeed)
 Initialize using the specified seed 更多...
 
AkUInt64 Seed () const
 Returns the current seed value of the RNG 更多...
 
AkUInt32 Peek () const
 Returns the next random number to be generated without advancing the RNG state 更多...
 
AkUInt32 Random ()
 Returns a random 31-bit unsigned integer 更多...
 
AkInt32 RandomInt ()
 Returns a random 31-bit integer 更多...
 
AkReal32 RandomFloat ()
 Returns a random float from 0.0 to 1.0 更多...
 

静态 Public 成员函数

static AkInt32 Random (AkUInt64 &io_uSeed)
 Returns a random 31-bit unsigned integer using provided seed 更多...
 
static AkInt32 RandomInt (AkUInt64 &io_uSeed)
 Returns a random 31-bit integer using provided seed 更多...
 
static AkUInt32 Peek (AkUInt64 in_uSeed)
 Returns the next random number to be generated without advancing the RNG state 更多...
 

静态 Public 属性

static constexpr AkUInt64 RANDOM_A = 6364136223846793005ULL
 
static constexpr AkUInt64 RANDOM_C = 1
 
static constexpr AkUInt32 RANDOM_MAX = 0x7FFFFFFF
 

详细描述

A pseudorandom number generator appropriate for introducing randomness in DSP processing LCG with Newlib/Musl characteristics: 64-bit seed, 31-bit output (see http://en.wikipedia.org/wiki/Linear_congruential_generator) Warning: This RNG is not cryptographically secure! Do not use it as such!

在文件 AkRng.h34 行定义.


此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅