POV-Ray : Newsgroups : povray.general : optimisation of functions - how to? : Re: optimisation of functions - how to? Server Time
30 Jul 2024 02:19:45 EDT (-0400)
  Re: optimisation of functions - how to?  
From: Thorsten Froehlich
Date: 20 Jan 2010 06:34:45
Message: <4b56ea55$1@news.povray.org>
On 20.01.10 11:24, makc wrote:
> "Tor Olav Kristensen"<tor### [at] TOBEREMOVEDgmailcom>  wrote:
>> "makc"<mak### [at] gmailspamcom>  wrote:
>> I can't remember having seen a function where this way of doing it is
>> not possible.
>>
>> But if you or anyone else can come up with a good challenge, then
>> please post it.
>
> Not exactly my original problem, but nevertheless major waste of cpu: the
> absence of "if"-like function (or am I overlooking it?)

You are overlooking it: What you want is "select", which is available both 
inside and outside functions. A description of its parameters, just like 
those of all other parameters, may be found in the documentation, i.e. at 
<http://www.povray.org/documentation/view/3.6.1/228/>. It can do everything 
the ternary operator in C can do, and a bit more.

	Thorsten


Post a reply to this message

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