POV-Ray : Newsgroups : povray.beta-test : Shorthand for conditionals : Re: Shorthand for conditionals Server Time
25 Apr 2024 10:47:35 EDT (-0400)
  Re: Shorthand for conditionals  
From: Mike Horvath
Date: 19 Nov 2016 23:30:15
Message: <583126d7$1@news.povray.org>
On 11/19/2016 9:33 PM, clipka wrote:
> Am 20.11.2016 um 02:58 schrieb Mike Horvath:
>> Can I make a feature request?
>>
>> It might be nice to have shorthand conditional statements that take the
>> form of
>>
>> #local r = r > 0.5 ? r - 0.055 : 12.92 * r;
>
> Such a conditional statement is already supported. For some strange
> reason, such expressions have to be included in parentheses though:
>
> #local r = (r > 0.5 ? r - 0.055 : 12.92 * r);
>

Okay. Weird. I was getting errors and this explains why.

Mike


Post a reply to this message

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