🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #7435

Re: Lattice BLink problem

#7435
From: Jean-Michel Forgeas
Date: Wed, 12 Dec 1990 12:45
21 lines
1271 bytes
In article <1990Nov22.133240.12613@gdr.bath.ac.uk>, J I L Gold writes:

> In one of the modules in the game I'm writing, I'm needing to get
> a random number. So, I #include <math.h> and use the function
> drand48() to give a double in [0,1). [...]

Don't know if you really want a double, but if not you'll find all you
need into amiga.lib (1.2, 1.3, 2.0x):

extern ULONG RangeSeed;             /* declared in amiga.lib */
    ...
    RangeSeed = your_seed_value;
    ...
    your_random_number = RangeRand( maximum );
    ...
--
                                     \___/
Jean-Michel Forgeas                   \-/
cbmvax!cbmehq!cbmfra!swinjm!forgeas    |    The Software Winery
                                      -^-
                           And, where is the universe ?
Technical Details
Message-ID: <1859e774.ARN0a72@swinjm.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cbmvax!cbmehq!cbmfra!swinjm!forgeas
References: <1990Nov22.133240.12613@gdr.bath.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cbmvax!cbmehq!cbmfra!swinjm!forgeas
From: forgeas@swinjm.UUCP (Jean-Michel Forgeas)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Lattice BLink problem
Message-ID: <1859e774.ARN0a72@swinjm.UUCP>
Date: 12 Dec 90 12:45:40 GMT
References: <1990Nov22.133240.12613@gdr.bath.ac.uk>
Reply-To: forgeas@swinjm.UUCP (Jean-Michel Forgeas)
Followup-To: comp.sys.amiga.tech
Organization: The Software Winery
Lines: 21