POV-Ray : Newsgroups : povray.unofficial.patches : Bitwise functions : Bitwise functions Server Time
23 Sep 2021 10:19:34 EDT (-0400)
  Bitwise functions  
From: Le Forgeron
Date: 14 Jul 2010 14:48:37
Message: <4c3e0685@news.povray.org>
Purpose: being able to compute bitwise and, or & xor.

Apply to 3.7beta38

syntax:

bitwise_and(i1,i2,...)
bitwise_or(i1,i2,...)
bitwise_xor(i1,i2,...)

(see max() syntax)

Why: because I needed a XOR operation for placement (classical double
loop with xor:
 for i=1 to 2^n
 for j=1 to 2^n
   x = i;
   y = bitwise_xor(i,j);
  object at <x,y>
 end for j
 end for i

The <x,y> cover first the main diagonal of the square and will end with
the other diagonal.)


Post a reply to this message


Attachments:
Download 'bitwise.tar.gz' (24 KB)

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