POV-Ray : Newsgroups : povray.beta-test : Are '&' and '|' switched? : Are '&' and '|' switched? Server Time
30 Jul 2024 22:22:33 EDT (-0400)
  Are '&' and '|' switched?  
From: ingo
Date: 26 Sep 2001 09:52:39
Message: <Xns9128A184570B3seed7@povray.org>
Expected the outcome of the scene below to be te other way around.

---%<------%<---
#declare F=function(a){a>-1 | a<1}  //returns  0 0 1 0 0
                                    //expected 1 1 1 1 1

//#declare F=function(a){a>-1 & a<1}  //returns 1 1 1 1 1
                                    //expected 0 0 1 0 0

#debug concat(str(F(-2), 2, 0), "\n")
#debug concat(str(F(-1), 2, 0), "\n")
#debug concat(str(F( 0), 2, 0), "\n")
#debug concat(str(F( 1), 2, 0), "\n")
#debug concat(str(F( 2), 2, 0), "\n\n")
---%<------%<---

PII 233 192MB NT4 SP6 POV-Ray-beta.4

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

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