POV-Ray : Newsgroups : povray.advanced-users : Conditional expressions in functions : Re: Conditional expressions in functions Server Time
2 Dec 2022 11:09:59 EST (-0500)
  Re: Conditional expressions in functions  
From: Bald Eagle
Date: 27 Feb 2021 20:15:01
Message: <web.603aede88a182d6d1f9dae300@news.povray.org>
I was also trying to minimize the processing of vectors, and executed the

#declare f_Axis = function (Vector) {select (Vector, x, y, z)}

Which worked, but did not give me the expected results.
My debug statements with str complained that it expected a value, but a vector
was encountered instead, which leads me to believe that it was returning the
_vector_ quantities x, y, and z - which I thought functions couldn't do?

modifying/correcting to:

#declare f_Axis = function (x, y, z, Vector) {select (Vector, x, y, z)}

yielded the expected scalar world-coordinate, so that's an interesting pair of

Post a reply to this message

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