Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public class LCG {
  2.  
  3. public LCG(long _a, long _c, long _m, long seed) {
  4. this.a = _a;
  5. this.c = _c;
  6. this.m = _m;
  7. }
  8. public long next() {
  9.  
  10. long x =(this.a*seed+this.m)%this.c;
  11. seed(x);
  12. return x;
  13. }
  14. public void seed(long seed) {
  15. seed = this.seed;
  16.  
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement