Functions
installDeterministicMath
function installDeterministicMath(): () => void
From @phaser-ae/kernel
Replace the transcendental functions on a host's own global Math with the deterministic ones, for code that no
bundle reaches: a Node test, a game server running rule packs. Returns a function that puts the host's back. Never
call it in a page: the page around the game would change too.
Constants
DETERMINISTIC_MATH_FUNCTIONS
const DETERMINISTIC_MATH_FUNCTIONS: ReadonlyArray<string>
From @phaser-ae/kernel
The names of the Math functions ECMAScript leaves implementation-approximated, which deterministicMath and
installDeterministicMath replace. Math.random is not among them: chance comes from game.rng (Law 4).
deterministicMath
const deterministicMath: Math
From @phaser-ae/kernel
A complete Math whose transcendental functions return the same bits on every engine. Everything else (the
constants, abs, sqrt, floor, min, max, imul, fround, random …) is the host's own, which ECMAScript
already specifies exactly. The bakery makes this the Math of every bundle it builds.
