Squirrel3 hash/noise function from Squirrel Eiserloh

What's New

Seedable protocol and consistent seed

  • 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.


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.


  • Swift Tools 5.0.0
View More Packages from this Author


  • None
Last updated: Wed Jun 29 2022 01:23:51 GMT-0500 (GMT-05:00)