POV-Ray : Newsgroups : povray.off-topic : 99 lines of C++ for an unbiased ray tracer : Re: 99 lines of C++ for an unbiased ray tracer Server Time
4 Sep 2024 15:18:01 EDT (-0400)
  Re: 99 lines of C++ for an unbiased ray tracer  
From: Invisible
Date: 14 Jan 2010 06:07:30
Message: <4b4efaf2@news.povray.org>
>> 53:  Vec nl=n.dot(r.d)<0?n:n*-1;
>>
>> different from "nl = -abs(n.dot(r.d))"?
> 
> a?b:c evaluates to b if a is true, or c otherwise.

Ah, wait, I misread that as calculating something, assigning it to n, 
and then checking whether n is negative and if not negating it. On 
closer inspection, that's not what this does...

>> Also, where THE HELL is "Xi" defined? I can see it *used* in several 
>> places, but I can't find a definitions.
> 
> Line 82, after the x=0 definition.

Wait - you can define MORE THAN ONE variable in a loop initialisation??


Post a reply to this message

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