function aleaRNGFactory(initialSeed) {
    let correction = CORRECTION_DEFAULT;
    let sequence0 = START_SEQUENCE_0;
    let sequence1 = START_SEQUENCE_1;
    let sequence2 = START_SEQUENCE_2;

    /**
     * Set the used seed number
     *
     * @throws {TypeError} Throws an exception if seed is float or negative
     * @param {number} seed A number value
     * @return {number} The used number value
     */
    function setSeed(seed) {
      throwInvalidAleaSeed(seed);

      sequence0 = (seed >>> 0) * FRACTURE_FLOAT;
      seed = (seed * MULTIPLIER + 1) >>> 0;
      sequence1 = seed * FRACTURE_FLOAT;
      seed = (seed * MULTIPLIER + 1) >>> 0;
      sequence2 = seed * FRACTURE_FLOAT;
      correction = CORRECTION_DEFAULT;

      return seed;
    }

    /**
     * Returns a generated random unsigned float number
     *
     * @return {number} Generated number
     */
    function uFloat32() {
      const singleTerm = TERM * sequence0 + correction * FRACTURE_FLOAT;
      correction = singleTerm | 0;
      sequence0 = sequence1;
      sequence1 = sequence2;
      sequence2 = singleTerm - correction;
      return sequence2;
    }

    /**
     * Returns a generated random unsigned 32 integer
     *
     * @return {number} Generated number
     */
    function uInt32() {
      return (uFloat32() * FRACTURE_INT) >>> 0;
    }

    /**
     * Get the internal sequence state
     *
     * @return {NumberGeneratorState} An object defining the internal state
     */
    function getState() {
      return {
        correction,
        sequence: [sequence0, sequence1, sequence2],
      };
    }

    /**
     * Set the internal sequence state
     *
     * @param {NumberGeneratorState} [state={correction: 1, sequence: [0, 0, 0]}] An object defining the internal state
     */
    function setState(state) {
      const defaultState = {
        correction: CORRECTION_DEFAULT,
        sequence: [START_SEQUENCE_0, START_SEQUENCE_1, START_SEQUENCE_2],
      };

      state = state || defaultState;
      state.sequence = state.sequence || [];

      correction = state.correction || CORRECTION_DEFAULT;
      sequence0 = state.sequence[0] || START_SEQUENCE_0;
      sequence1 = state.sequence[1] || START_SEQUENCE_1;
      sequence2 = state.sequence[2] || START_SEQUENCE_2;
    }

    setSeed(initialSeed === undefined ? 1 : initialSeed);

    return { setSeed, uFloat32, uInt32, getState, setState };
  }
/**
   * Number generator with Alea algorithm
   *
   * @param {number} [initialSeed=1] Optional start seed number
   * @return {NumberGenerator} A number generator object
   */
Number generator with Alea algorithm
@param {number} [initialSeed=1] Optional start seed number
@return {NumberGenerator} A number generator object
Number generator with Alea algorithm @param { number } [ initialSeed = 1 ] Optional start seed number @return { NumberGenerator } A number generator object
function aleaRNGFactory(initialSeed) {
    let correction = CORRECTION_DEFAULT;
    let sequence0 = START_SEQUENCE_0;
    let sequence1 = START_SEQUENCE_1;
    let sequence2 = START_SEQUENCE_2;
    function setSeed(seed) {
      throwInvalidAleaSeed(seed);
      sequence0 = (seed >>> 0) * FRACTURE_FLOAT;
      seed = (seed * MULTIPLIER + 1) >>> 0;
      sequence1 = seed * FRACTURE_FLOAT;
      seed = (seed * MULTIPLIER + 1) >>> 0;
      sequence2 = seed * FRACTURE_FLOAT;
      correction = CORRECTION_DEFAULT;
      return seed;
    }
    function uFloat32() {
      const singleTerm = TERM * sequence0 + correction * FRACTURE_FLOAT;
      correction = singleTerm | 0;
      sequence0 = sequence1;
      sequence1 = sequence2;
      sequence2 = singleTerm - correction;
      return sequence2;
    }
    function uInt32() {
      return (uFloat32() * FRACTURE_INT) >>> 0;
    }
    function getState() {
      return {
        correction,
        sequence: [sequence0, sequence1, sequence2],
      };
    }
    function setState(state) {
      const defaultState = {
        correction: CORRECTION_DEFAULT,
        sequence: [START_SEQUENCE_0, START_SEQUENCE_1, START_SEQUENCE_2],
      };
      state = state || defaultState;
      state.sequence = state.sequence || [];
      correction = state.correction || CORRECTION_DEFAULT;
      sequence0 = state.sequence[0] || START_SEQUENCE_0;
      sequence1 = state.sequence[1] || START_SEQUENCE_1;
      sequence2 = state.sequence[2] || START_SEQUENCE_2;
    }
    setSeed(initialSeed === undefined ? 1 : initialSeed);
    return { setSeed, uFloat32, uInt32, getState, setState };
  }
function aleaRNGFactory ( initialSeed ) { let correction = CORRECTION_DEFAULT ; let sequence0 = START_SEQUENCE_0 ; let sequence1 = START_SEQUENCE_1 ; let sequence2 = START_SEQUENCE_2 ; function setSeed ( seed ) { throwInvalidAleaSeed ( seed ) ; sequence0 = ( seed >>> 0 ) * FRACTURE_FLOAT ; seed = ( seed * MULTIPLIER + 1 ) >>> 0 ; sequence1 = seed * FRACTURE_FLOAT ; seed = ( seed * MULTIPLIER + 1 ) >>> 0 ; sequence2 = seed * FRACTURE_FLOAT ; correction = CORRECTION_DEFAULT ; return seed ; } function uFloat32 ( ) { const singleTerm = TERM * sequence0 + correction * FRACTURE_FLOAT ; correction = singleTerm | 0 ; sequence0 = sequence1 ; sequence1 = sequence2 ; sequence2 = singleTerm - correction ; return sequence2 ; } function uInt32 ( ) { return ( uFloat32 ( ) * FRACTURE_INT ) >>> 0 ; } function getState ( ) { return { correction , sequence : [ sequence0 , sequence1 , sequence2 ] , } ; } function setState ( state ) { const defaultState = { correction : CORRECTION_DEFAULT , sequence : [ START_SEQUENCE_0 , START_SEQUENCE_1 , START_SEQUENCE_2 ] , } ; state = state || defaultState ; state . sequence = state . sequence || [ ] ; correction = state . correction || CORRECTION_DEFAULT ; sequence0 = state . sequence [ 0 ] || START_SEQUENCE_0 ; sequence1 = state . sequence [ 1 ] || START_SEQUENCE_1 ; sequence2 = state . sequence [ 2 ] || START_SEQUENCE_2 ; } setSeed ( initialSeed === undefined ? 1 : initialSeed ) ; return { setSeed , uFloat32 , uInt32 , getState , setState } ; }
Number generator with Alea algorithm
 @param {number} [initialSeed=1] Optional start seed number
 @return {NumberGenerator} A number generator object
Number generator with Alea algorithm @param { number } [ initialSeed = 1 ] Optional start seed number @return { NumberGenerator } A number generator object
/**
     * Set the used seed number
     *
     * @throws {TypeError} Throws an exception if seed is float or negative
     * @param {number} seed A number value
     * @return {number} The used number value
     */ /**
     * Returns a generated random unsigned float number
     *
     * @return {number} Generated number
     */ /**
     * Returns a generated random unsigned 32 integer
     *
     * @return {number} Generated number
     */ /**
     * Get the internal sequence state
     *
     * @return {NumberGeneratorState} An object defining the internal state
     */ /**
     * Set the internal sequence state
     *
     * @param {NumberGeneratorState} [state={correction: 1, sequence: [0, 0, 0]}] An object defining the internal state
     */