POV-Ray : Newsgroups : povray.general : nan (not a number) : Re: nan (not a number) Server Time
28 Sep 2024 11:01:59 EDT (-0400)
  Re: nan (not a number)  
From: Thorsten Froehlich
Date: 15 Apr 1999 14:06:04
Message: <37161c7c.0@news.povray.org>
In article <3714a7c6.0@news.povray.org> , "Daniele Varrazzo" <piro at 
officine dot it> 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.

There is!

#declare myvector = <0,0,0>

#if((myvector.x == 0) && (myvector.y == 0) && (myvector.z == 0))
#error "Error"
#endif


     Thorsten


Post a reply to this message

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