- 最后登录
- 2019-12-25
- 注册时间
- 2012-8-24
- 阅读权限
- 90
- 积分
- 71088
- 纳金币
- 52304
- 精华
- 343
|
Requires Unity 5.0.0 or higher.
A serious RNG library for serious engineers.
Make It Random is a fast, flexible, extensible, and feature-rich random number generation library. Unlike UnityEngine.Random, Make It Random provides the following benefits:
• Offers a wide variety of utilities on top of the basic random number generation, including non-uniform distribution sampling.
• Produces higher quality uniform distributions of integer and floating point numbers.
• Allows multiple concurrent random engines, each seeded differently, independently generating sequences of random values.
• Can be seeded using a wider variety of data, such as strings or byte arrays of any length.
• Can be used on any thread, not just the main thread.
• Includes multiple random engine algorithms and supports implementation of your own.
• Reduces confusion about whether the lower and upper bounds of ranges are inclusive or exclusive.
The categories of random data that Make It Random can generate includes:
• bits
• integers
• floating point numbers
• angles
• vectors and quaternions
• strings
• dice rolls
• colors (includes Make It Colorful)
In addition, Make It Random includes utilities for the following, with support for non-uniform weights where applicable:
• evaluating probabilities
• sampling from distributions
• selecting elements from a list
• selecting values from an enumeration
• selecting values from the set {-1, 0, +1}
• shuffling a list
The library is very extensible, to support whatever underlying RNGs and extension functions you might want. Full source code is included.
|
|