POV-Ray : Newsgroups : povray.general : Bug with noise generator : Re: Bug with noise generator Server Time
5 Nov 2024 05:23:13 EST (-0500)
  Re: Bug with noise generator  
From: Thorsten Froehlich
Date: 28 Jun 2003 04:02:09
Message: <3efd4b81@news.povray.org>
In article <web.3efcbb174718e7c3d0082e520@news.povray.org> , "Zohar" 
<zoh### [at] yahoocom> wrote:

>    do {
>       Find a random vector in the unit cube.
>       s = the length of the vector, squared.
>    } while ((s > 1.0) && (s < 1.0e-5));
>
>    Normalize the vector;
>
> The condition is a contradiction, and should have been:
>    "while ((s > 1.0) || (s < 1.0e-05))"

Indeed, the current code does not make sense.  This is a bug.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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