POV-Ray : Newsgroups : povray.advanced-users : Need help with rand/seed : Re: Need help with rand/seed Server Time
30 Jul 2024 00:25:26 EDT (-0400)
  Re: Need help with rand/seed  
From: Chris Huff
Date: 13 Jul 2000 12:18:54
Message: <chrishuff-90AE8F.11191813072000@news.povray.org>
In article <396DE7BD.CBD106A4@aetec.ee>, Vahur Krouverk 
<vah### [at] aetecee> wrote:

> For value between 1 and 5 use following expression:
> (rand()+1)*4

Umm, that will give random numbers between 4 and 8. You want this:
(rand()*4+1)
Or use the RRand() macro I posted earlier.

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.