POV-Ray : Newsgroups : povray.general : nan (not a number) : Re: nan (not a number) Server Time
28 Sep 2024 11:02:14 EDT (-0400)
  Re: nan (not a number)  
From: Spider
Date: 15 Apr 1999 14:28:18
Message: <3716206F.6441B288@bahnhof.se>
Why not do something like this ?

#macro vnorm(vV)
  #if(vV=<0,0,0>)
    (<0,0,0>)
  #else
    vnormalize(vV)
  #end
#end

Daniele Varrazzo wrote:
> 
> vnormalize (<0, 0, 0>) isn't matematically defined... but POV-Ray 3.1a
> (windows) returns a "perfectly valid" <nan, nan, nan> vector... it's a sin
> that there isn't any IsNan() function or something like that to recognize
> it. And if i use this vector in any object the perser locks only while
> creating light buffers.
> I think vnormalize (<0, 0, 0>) should return an error in parsing time, and
> POV should be compiled ignoring them.

-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message

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