|
![](/i/fill.gif) |
"slehar" <sle### [at] gmail com> wrote:
> Can someone please explain to me why I ***can't*** do this?
>
> CODE >>>>
> #declare myVector = <1,2>
>
> atan2(myVector.y,myVector.x)
> <<<< CODE
>
> Parse Error: Expected 'operand', uv vector identifier found instead
>
> But why I ***CAN*** do this?
>
> CODE >>>>
> #declare myVector = <1,2>;
> #declare xValue = myVector.x;
> #declare yValue = myVector.y;
>
> atan2(yValue,xValue)
> <<<< CODE
>
> Works just fine!
>
> Isn't myVector.x a plain float value that can be used wherever
> a float is required?
>
> slehar
You are correct that it "should" behave that way. I know there is talk of
overhauling SDL and parsing for version 4.0. Out of curiosity, have you tried
placing parenthesis? Such as:
atan2( (myVector.y) , (myVector.x) )
or even
atan2( (myVector.y + 0) , (myVector.x + 0) )
just off hand ideas, haven't tried it myself.
-Reactor.
Post a reply to this message
|
![](/i/fill.gif) |