Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!amiga!kodiak From: kodiak@amiga.UUCP (Robert R. Burns) Newsgroups: comp.sys.amiga.tech Subject: Re: Random Message-ID: <4552@amiga.UUCP> Date: 15 Sep 89 18:40:44 GMT References: <19504@unix.cis.pitt.edu> <89256.111549UH2@PSUVM.BITNET> <1989Sep14.005314.8261@agate.berkeley.edu> Reply-To: kodiak@batgirl.UUCP (Robert R. Burns) Organization: Commodore-Amiga Inc, Los Gatos CA Lines: 33 Try: extern ULONG RangeSeed; extern UWORD RangeRand( UWORD ); /* A.K.A. RangeRan */ /* * RangeRand -- ranged random function * * INPUT * range: 1 <= range < 65536 * * OUTPUT * random number: 0 <= range < range */ Link w/ amiga.lib This was written by Amiga's "Mgr. of Game Software" for the old Amiga but didn't make it into the roms because we moved away from that focus. I know it's in my copy of amiga.lib, and I suspect it's in yours too. Let me know (via email) if it's not. I can well imagine that it isn't documented anywhere. - Kodiak -- Bob Burns, amiga!kodiak _ | /_ _|. _ | Commodore __ |_) _ |_ _ )' |<(_)(_)|(_\|< /\ | ||| _` /\ |_)(_\| )(_\ | | \ Software ___/..\|\/|||__|/..\___ Faith