POV-Ray : Newsgroups : povray.newusers : Problem with variables : Re: Problem with variables Server Time
4 Sep 2024 16:12:54 EDT (-0400)
  Re: Problem with variables  
From: Johannes Dahlstrom
Date: 27 Oct 2002 08:55:18
Message: <3dbbf045@news.povray.org>
Kaveh wrote:

> Thanks Johannes. I haven't come across this construction, and can't find
> it in the manual. Can you give me a hint as to where I can find more
> information on this?
> 

You mean the ? : ternary operator? Basically, it works like a simple 
if/else construct:

 #if(<expression>) <do_this> #else <do_that> #end

is the same as:

 (<expression>) ? <do_this> : <do_that>

That is, if <expression> returns true, it executes the <do_this> part, 
otherwise the <do_that> part.

In the POV manual: 
6.1.3.3 Float Operators
http://www.povray.org/documentation/view/137/


Post a reply to this message

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