当前位置:网站首页>GKARC4RandomSource
GKARC4RandomSource
2022-07-28 10:18:00 【monsterk1】
GKARC4RandomSource
一个基础的ARC4算法随机数发生器,运用于绝大部分的游戏机制,
概括
重要
GameplayKit中提供的随机化服务适用于可靠地创建确定性的伪随机游戏机制,但不具备加密性。对于加密,混淆或密码使用,请使用描述“加密指南”的Security框架。要使用此随机源生成基本随机值,请使用GKRandom协议中定义的方法。 要生成具有特定范围和分布的随机值,请使用该随机源与GKRandomDistribution类或其子类之一。
当你创建此类的实例时,生成的随机源是独立的和确定性的,也就是说,一个实例生成的数字序列对任何其他实例生成的序列没有影响,并且该序列可以在必要时复制。 有关复制序列的详细信息,请参阅seed属性和initWithSeed: 初始化方法。
注意
GKARC4RandomSource随机源类使用类似的算法,但独立于arc4random系列的C函数。
Topics
创建随机源(Creating a Random Source)
- init
- initWithSeed:
复制随机行为(Replicating Random Behavior)
seed
避免可预测的行为(Avoiding Predictable Behavior)
- dropValuesWithCount:
关系
继承
GKRandomSource
边栏推荐
猜你喜欢

PHP generates QR code (learning)

爱可可AI前沿推介(7.28)

gcc: error trying to exec 'as': execvp: No such file or directory

机器学习--手写英文字母1--分类流程

AP AUTOSAR platform design 1-2 introduction, technical scope and method

Aqua Data Studio 18.5.0 export insert statement

IDEA创建我的第一个项目

7. Dichotomy -- find a set of repeated or ordered but rotating arrays

Record a parent-child project in idea, modify the name of project and module, and test it personally!

Typora使用教程
随机推荐
Alibaba cloud image address
Add new startup logo and startup / shutdown animation in mt6735
Typora tutorial
Hurun released the 2020 top 10 Chinese chip design private enterprises: Huawei Hisilicon did not appear on the list!
20200229 training race L2 - 2 tree species Statistics (25 points)
机器人技术(RoboCup 2D)如何进行一场球赛
发力大核、独显!英众科技2020十代酷睿独显产品发布
逆元&组合数&快速幂
Differences among pipes, pipe passes and pipe States
SQL Server 2016 learning records - data update
Idea packages jar packages and runs jar package commands
Record a parent-child project in idea, modify the name of project and module, and test it personally!
ACM寒假集训#5
20200217 training match L1 - 7 2019 is coming (20 points)
Multithreading and high concurrency (III) -- source code analysis AQS principle
Can kingbasees v8r6 JDBC use VIP?
20200229训练赛 L1 - 2 删除字符串中的子串 (20分)
【栈的应用】--- 中缀表达式转后缀表达式
20200217训练赛 L1 - 7 2019来了 (20分)
16. String inversion