
package com.badlogic.gdx.math;

import java.util.Random;

/** This class implements the xorshift 128+ algorithm known as the fastest among the PRNG, the comparisons between this and the
 * java default random show an average difference of 10 ms on an input of 1 millions of floating point numbers. To use it inside
 * the code one can simply assign an instance of this class to {@link MathUtils#random} member at application setup and generate
 * the random numbers using the methods of {@link MathUtils} class. More information and algorithms can be found <a
 * href="http://xorshift.di.unimi.it/">here</a> */
public class RandomXS128 extends Random {
	long[] s = new long[2];

	public RandomXS128 (long seed0, long seed1) {
		s[0] = seed0;
		s[1] = seed1;
	}

	/** It will allocate a {@link Random} to generate the two long seeds */
	public RandomXS128 () {
		Random random = new Random();
		s[0] = random.nextLong();
		s[1] = random.nextLong();
	}

	@Override
	protected int next (int bits) {
		long s1 = s[0];
		long s0 = s[1];
		s[0] = s0;
		s1 ^= s1 << 23; // a
		s[1] = (s1 ^ s0 ^ (s1 >> 17) ^ (s0 >> 26)) + s0; // b, c
		return (int)(s[1] & ((1L << bits) - 1));
	}
}

@@ -656,26 +656,21 @@
 long
-%5B%5D s = new long%5B2%5D
+ seed0, seed1
 ;%0A%0A%09
@@ -717,20 +717,26 @@
 d1) %7B%0A%09%09
-s%5B0%5D
+this.seed0
  = seed0
@@ -739,20 +739,26 @@
 eed0;%0A%09%09
-s%5B1%5D
+this.seed1
  = seed1
@@ -896,19 +896,20 @@
 m();%0A%09%09s
-%5B0%5D
+eed0
  = rando
@@ -925,19 +925,20 @@
 g();%0A%09%09s
-%5B1%5D
+eed1
  = rando
@@ -1012,19 +1012,20 @@
 g s1 = s
-%5B0%5D
+eed0
 ;%0A%09%09long
@@ -1035,19 +1035,21 @@
  = s
-%5B1%5D
+eed1
 ;%0A%09%09s
-%5B0%5D
+eed0
  = s
@@ -1077,19 +1077,17 @@
 // a%0A%09%09s
-%5B1%5D
+1
  = (s1 %5E
@@ -1131,16 +1131,30 @@
 // b, c%0A
+%09%09seed1 = s1;%0A
 %09%09return
@@ -1165,11 +1165,9 @@
 t)(s
-%5B1%5D
+1
  & (

Use fields.