Search:

Type: Posts; User: Samkli

Search: Search took 0.07 seconds.

  1. Replies
    4
    Views
    907

    Re: How does java.util.Random work?

    Could you explain what you mean by this?
  2. Replies
    4
    Views
    907

    How does java.util.Random work?

    long seed = 314159265;
    Random rand = new Random(seed);
    int a = rand.nextInt();

    seed = (seed * 0x5DEECE66DL + 0xBL) & ((1L << 48) - 1);
    int b = (int) (seed >>> (48 - 32));

    Why...
Results 1 to 2 of 2