|
![](/i/fill.gif) |
In article <40197115@news.povray.org> , Wolfgang Wieser <wwi### [at] gmx de>
wrote:
> Is there a define/const int anywhere which tells me the size
> of the COLOUR array?
>
> Hard-coding the size 5 into MY code seems to be the worst solution.
Well, there is nothing in there that says it has to be a float, does it? So
this should read sizeof(COLOUR)/sizeof(COLC) if you really insist on the
rather pointless idea to assume the COLOUR could ever change its number of
componenents in 3.x code...
The "correct" way to implement you interpolation would be to follow current
implementation, which is to put the interpolation into a macro or inline
function in colour.h . This way anybody who might really want to try to
change the number of color components could easily find your code next to
the other code operating on colors.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
![](/i/fill.gif) |