Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #1448

Re: Generating a random number on a ball

Date 2011-12-13 17:33 -0800
From Patricia Shanahan <pats@acm.org>
Newsgroups comp.lang.java.help
Subject Re: Generating a random number on a ball
References <18f0d020-b1ab-42fe-aaca-94d193a393f2@y6g2000yqe.googlegroups.com> <m1j7d7dj14j9fhn80jcfsnb7p03nujo584@4ax.com> <gnt6pl0t0agl$.1j1jobujp7x3w.dlg@40tude.net>
Message-ID <JJ-dnTn9OL9kYXrTnZ2dnUVZ_gOdnZ2d@earthlink.com> (permalink)

Show all headers | View raw


Joerg Meier wrote:
> On Mon, 28 Nov 2011 10:02:01 -0800, Roedy Green wrote:
> 
>> I don't see your random number code. See
>> http://mindprod.com/jgloss/pseudorandom.html
>> for how to generate the numbers Getting the number on the ball in 2D
>> is a matter of knowing where the ball is and doing a drawString.
> 
> I looked at that and randomly saw:
> 
> "Don’t use two different generators with a null seed."
> 
> Do you mean "0" seed, or no seed ? Because the Random constructor will not
> take null.

No seed. The problem is that the default seed may not have changed, so
the two generators may be returning the same sequence of numbers.

Patricia

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Generating a random number on a ball Michael Adedeji <yankosmgt@gmail.com> - 2011-11-28 05:53 -0800
  Re: Generating a random number on a ball Patricia Shanahan <pats@acm.org> - 2011-11-28 07:04 -0800
  Re: Generating a random number on a ball Roedy Green <see_website@mindprod.com.invalid> - 2011-11-28 10:02 -0800
    Re: Generating a random number on a ball Joerg Meier <joergmmeier@arcor.de> - 2011-12-14 01:20 +0100
      Re: Generating a random number on a ball Patricia Shanahan <pats@acm.org> - 2011-12-13 17:33 -0800
        Re: Generating a random number on a ball Ian Shef <invalid@avoiding.spam> - 2011-12-15 18:30 +0000
          Re: Generating a random number on a ball Patricia Shanahan <pats@acm.org> - 2011-12-15 13:11 -0800

csiph-web