|
|
That's exactly what I was looking for. Very elegant, many thanks.
I also agree with other contributors that a more generic solution would be
very useful.
Neil
Ron Parker <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> On Sun, 24 Sep 2000 22:08:05 +0100, Neil Freebairn wrote:
> >Is there any way to tell a identifier which evaluates to a vector from an
> >identifier which evaluates to a real?
>
> (reply confined to advanced-users, which is the most appropriate of the
> crossposted groups.)
>
> If what you're going to get is guaranteed to be either a scalar or a 3-d
> vector, you can do something like this:
>
> #macro scalar_or_vector( A )
>
> #declare C = rgbft 0 + A;
>
> #if ( C.filter = C.red )
> #debug "scalar\n"
> #else
> #debug "vector\n"
> #end
>
> #end
>
>
> --
> Ron Parker http://www2.fwi.com/~parkerr/traces.html
> My opinions. Mine. Not anyone else's.
> Proudly not helping RIAA and SDMI steal my rights --
> http://www.eff.org/Misc/EFF/Newsletters/EFFector/HTML/effect13.08.html
Post a reply to this message
|
|