POV-Ray : Newsgroups : povray.advanced-users : Random number generator needed ! : Random number generator needed ! Server Time
29 Jul 2024 18:21:15 EDT (-0400)
  Random number generator needed !  
From: Rune
Date: 20 Feb 2001 14:59:36
Message: <3a92cca8@news.povray.org>
I need a macro that outputs a random number between 0 and 1 when called. It
should have two integers as input. The reason I can't just use rand() and
seed() is that I need it to always output the same random number when the
same input numbers are used.

I need a macro like this: Rand (Int1, Int2)

I don't know anything about random number generators myself, so some help
would be much appreciated.

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

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