Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #5773
| From | Richard Ashbery <basura@invalid.addr.uk> |
|---|---|
| Newsgroups | comp.sys.acorn.programmer |
| Subject | Re: Specific numbers but in a random sequence |
| Date | 2019-06-22 12:03 +0100 |
| Organization | None |
| Message-ID | <57c815b263basura@invalid.addr.uk> (permalink) |
| References | <57c7c5d6c0basura@invalid.addr.uk> <qeji40$7ca$1@dont-email.me> <qel12p$ibq$1@dont-email.me> |
In article <qel12p$ibq$1@dont-email.me>, druck <news@druck.org.uk> wrote: > On 21/06/2019 22:27, Gavin Crawford wrote: > > Richard Ashbery <basura@invalid.addr.uk> Wrote in message: > >> The following variables can be used to calculate precise > >> anglesthrough which an object can be rotated. The first rotates > >> objectthrough 360/3 = 120 degrees, the next one 360/4 = 90 > >> degrees and soon. Each calculation creates an integer with no > >> decimal places.3,4,5,6,8,9,10,12,15,18,20,24,30,36,45,60,90,120I > >> would like to be able to use these variables in a random > >> sequence.Has anyone a BASIC routine that could do this please? > Any reason 2 and 180 aren't used? Good question: 2 objects looked a little odd in the animation so I went for 3 as a minimum. > > Why not put them into an array and use a random number to choose > > the array index. > Yes, and make sure you seed the random number generator, or it may > always go through the same pseudo random sequence each time its run. > IIRC to seed do RND(-TIME) before any other call to RND. Thanks guys for your help as always. The array method should work. RND(-TIME) is a great idea to get non-repeating random numbers. Many thanks Richard
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-21 21:31 +0100
Re:Specific numbers but in a random sequence Gavin Crawford <gc@dentrassis.com> - 2019-06-21 22:27 +0100
Re: Specific numbers but in a random sequence druck <news@druck.org.uk> - 2019-06-22 11:48 +0100
Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-22 12:03 +0100
Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-22 16:46 +0100
Re: Specific numbers but in a random sequence Someone Somewhere <nntpac@gmail.com> - 2019-06-22 17:11 +0100
Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-22 18:21 +0100
Re: Specific numbers but in a random sequence Steve Fryatt <news@stevefryatt.org.uk> - 2019-06-22 21:29 +0100
Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-23 11:17 +0100
Re: Specific numbers but in a random sequence Ian <Ian.Hamilton@AAUG.net> - 2019-06-23 12:07 +0100
Re: Specific numbers but in a random sequence Paul Oates <oatespaul@btinternet.com> - 2019-06-23 13:17 +0100
Re: Specific numbers but in a random sequence Steve Fryatt <news@stevefryatt.org.uk> - 2019-06-23 13:51 +0100
Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-23 14:10 +0100
Re: Specific numbers but in a random sequence Steve Fryatt <news@stevefryatt.org.uk> - 2019-06-23 15:59 +0100
Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-23 17:14 +0100
Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-23 14:01 +0100
Re: Specific numbers but in a random sequence Paul Oates <oatespaul@btinternet.com> - 2019-06-22 17:52 +0100
Re: Specific numbers but in a random sequence Julian Fry <julianfry@orpheusmail.co.uk> - 2019-06-22 17:56 +0100
Re: Specific numbers but in a random sequence Julian Fry <JulianFry@compuserve.com> - 2019-06-22 18:05 +0100
Re: Specific numbers but in a random sequence Sebastian Barthel <naitsabes@freenet.de> - 2019-06-24 07:37 +0000
Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-24 20:13 +0100
csiph-web