|
![](/i/fill.gif) |
"slehar" <sle### [at] gmail com> wrote in message
news:web.487b4422d340be7bf75a90cb0@news.povray.org...
> "Chris B" <nom### [at] nomail com> wrote:
>> "slehar" <sle### [at] gmail com> wrote in message
>> news:web.487a73ecc7f877ecf75a90cb0@news.povray.org...
>>
>> #declare myVector = <1,2>;
>> #debug concat("myAngle: ", str(atan2(myVector.y,myVector.x),3,3),"\n")
>>
>> writes "myAngle: 1.107" into the message stream for me on 3.6 under
>> Windows.
>> What version are you running?
>>
>> Regards,
>> Chris B.
>
> Wow, thats bizarre! That code works for me too! But when I put the
> atan2( ) in
> the density function where I need it, it doesn't work!
>
> I'm running version 3.6.
Ah. I'm not sure it's your problem, but x, y and z are the default parameter
names used with a function, so I'd guess that they have a different meaning
if used in a function definition or within function parameters. You might
want to try the equivalent colour vector component in your context on the
off-chance that it'll work. It works ok in the following context:
#declare myVector = <1,2>;
#debug concat("myAngle: ", str(atan2(myVector.green,myVector.red),3,3),"\n")
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |