Path: chuka.playstation.co.uk!news From: Nigel Critten Newsgroups: scee.yaroze.freetalk.english Subject: Re: rand () Date: Sat, 13 Mar 2004 01:12:29 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 13 Message-ID: References: NNTP-Posting-Host: modem-634.bonobo.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en In-Reply-To: well what do you know, you learn a bit of C every day, or at least I do Rand()%20 will produce a number between 0 and 20, then apply Shawn's idea of taking half of it away and you get a range between -10 and 10 its the Rand()%20 bit I didn't know about... Jon I was thinking of tables but I needed a few different ranges and so wanted to avoid them. Again thanks all for your help Nigel