POV-Ray : Newsgroups : povray.general : Test for vector <0,0,0> : Test for vector <0,0,0> Server Time
9 Aug 2024 01:25:26 EDT (-0400)
  Test for vector <0,0,0>  
From: Rune
Date: 2 Sep 2000 08:23:57
Message: <39b0f15d@news.povray.org>
I see many people use

#if ( Vector.x=0 & Vector.y=0 & Vector.z=0 )
and
#if ( Vector.x!=0 & Vector.y!=0 & Vector.z!=0 )

I personally find it much simpler to use

#if (vlength(Vector)=0)
and
#if (vlength(Vector)!=0)

I just thought I'd share it with you.

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 July 23)
/ Also visit http://www.povrayusers.org


Post a reply to this message

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