Swiftpack.co - heckj/Squirrel3 as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by heckj.
heckj/Squirrel3 1.1.0
Squirrel3 hash/noise function from Squirrel Eiserloh
⭐️ 2
🕓 25 weeks ago
.package(url: "https://github.com/heckj/Squirrel3.git", from: "1.1.0")

Squirrel3

A Swift implementation of the Squirrel3 hash function and pseudo-random number generator as invented by Squirrel Eiserloh, described in detail at the 2017 GDC Math for Game Programmers talk Noise-Based RNG.

GitHub

link
Stars: 2
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Seedable protocol and consistent seed
25 weeks ago
  • Updates Squirrel3 with a new SeededRandomNumberGenerator protocol, which formalizes the ability to see a random number generator (specifically with a UInt64 seed), and references a constant seed property and a variable position property for the generator.
  • updated Squirrel3 implementation to mutate on the position and keep the initial seed constant. With the two values together, the next generated random value is deterministic.
  • adds tests to verify the determinism as well as seed and position values.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics