|
![](/i/fill.gif) |
Philippe Debar wrote:
> I got a problem with colour component extraction. It seems that when
> you use colour component extraction and use the result immediately,
> what you got is a float. But if there is an intermediate step
> (#declare, #local or pass as a macro argument), it reverts to a colour.
>
> In other word:
> floatFunction(aColor.red) is OK, but
> #declare myFloat=aColor.red is not a float but a colour
>
> I suspect this is a bug. But of course I could be wrong (would not be
> the first time). Could you please check? I browsed p.bugreports but
> could find nothing related.
>
AFAIK this is due to the fact that pov uses the first thing it
encouters after the "=" sign to determine the type of the variable.
#declare myFloat=aColor.red is a color because aColor is used to
determine the type, but:
#declare myFloat=0+aColor.red is a float as expected...
Jerome
--
*******************************
* they'll tell you what can't * mailto:ber### [at] iname com
* be done and why... * http://www.enst.fr/~jberger
* Then do it. *
*******************************
Post a reply to this message
|
![](/i/fill.gif) |