POV-Ray : Newsgroups : povray.advanced-users : Conditional expressions in functions : Re: Conditional expressions in functions Server Time
24 Apr 2024 10:06:09 EDT (-0400)
  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
following:

#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
results.


Post a reply to this message

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