POV-Ray : Newsgroups : povray.unofficial.patches : Why & has higher precedence than + or - in isosurface functions? : Why & has higher precedence than + or - in isosurface functions? Server Time
2 Sep 2024 00:12:26 EDT (-0400)
  Why & has higher precedence than + or - in isosurface functions?  
From: Warp
Date: 31 Jul 2000 09:03:01
Message: <39857905@news.povray.org>
Is there a reason for the operator & having higher precedence than + or -
in isosurface functions?
  The equivalent operator in logic (the one that looks like an upside down 'V')
hasn't, and it would be natural to have the same precedence in isosurface
functions.
  If I write this function:

function { x+y & y+z }

at least I read it in the same way as in mathematics (I'll use '&' here, but
imagine that it's the upside down 'V'):

x+y=0 & y+z=0

  However the current isosurface implementation reads it this way:

x+(y&y)+z

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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