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
Swift language wrapper around the Squirrel3 hash/noise function from Squirrel Eiserloh
⭐️ 3
🕓 2 years ago
iOS macOS watchOS tvOS
.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: 3
Last commit: 16 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Seedable protocol and consistent seed
2 years 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