axolotl-pm/xoroshiro128pp

Xoroshiro128++ random number generator for PocketMine-MP

Maintainers

Package info

github.com/axolotl-pm/Xoroshiro128PP

pkg:composer/axolotl-pm/xoroshiro128pp

Transparency log

Statistics

Installs: 161

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0 2026-08-24 05:25 UTC

This package is auto-updated.

Last update: 2026-08-25 04:33:17 UTC


README

CI

Xoroshiro128++ random number generator, made for use in PocketMine-MP.

Usage

use pocketmine\xoroshiro\Xoroshiro128PP;

$random = Xoroshiro128PP::fromSeed($seed);
$random->nextLong();   // signed 64-bit
$random->nextFloat();  // [0, 1)
  • Xoroshiro128PP - the generator. fromSeed() expands one 64-bit seed into the 128-bit state the way Minecraft does; the constructor takes the two halves of the state directly.
  • SplitMix64 - the finaliser (Stafford variant 13) that seeding is built on, exposed because position hashes often need it on its own.

Requirements

  • PHP 8.1 or newer, 64-bit
  • ext-gmp