POV-Ray : Newsgroups : povray.general : nan (not a number) : Re: nan (not a number) Server Time
28 Jun 2024 02:21:29 EDT (-0400)
  Re: nan (not a number)  
From: Spider
Date: 15 Apr 1999 14:37:48
Message: <371622D0.8439421C@bahnhof.se>
or even better.
#macro vnorm(vV)
  #if(vV=<0,0,0>)
    #error "Normalize of <0,0,0>"
  #else
    vnormalize(vV)
  #end
#end

Spider wrote:
> 
> 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"

-- 
//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.