Re: Random number
Re: Random number
- Subject: Re: Random number
- From: Andrew Pinski <email@hidden>
- Date: Fri, 11 Jul 2003 10:51:54 -0400
Actually he needs to use srandom(time(NULL)) since he is using random,
and not rand.
Thanks,
Andrew Pinski
On Friday, Jul 11, 2003, at 10:40 US/Eastern, Marc Weil wrote:
Use srand(time(NULL)) to seed the random number generator. Make sure
that
you #include <time.h> and <math.h>.
- Marc Weil
On 7/11/03 10:30 AM, "Toon Van Acker" <email@hidden> wrote:
I can get a random number using random(), but it stays the same. What
I
mean is: I'm creating objects which should have random coordinates,
but
every one of them has the same coordinates.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.