Search by

betterlite / xoroshiro128pp

Akari-my

Xoroshiro128++ random number generator for PocketMine-MP

Package info

github.com/BetterLite/Xoroshiro128PP

pkg:composer/betterlite/xoroshiro128pp

Statistics

Installs: 187

Dependents: 0

Suggesters: 0

Stars: 0

0.1.0 2026-09-10 13:26 UTC

This package is auto-updated.

Last update: 2026-09-10 13:30:45 UTC


README

CI

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

Usage

use pocketmine\xoroshiro128pp\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