it works here, double check your order of operations:
#N canvas 131 195 450 300 12; #X msg 119 70 1 0 1.5708; #X floatatom 119 140 15 0 0 0 - - - 0; #X floatatom 361 137 5 0 0 0 - - - 0; #X obj 119 95 expr ($f1*cos($f3))-($f2*sin($f3)) ; ($f1*sin($f3))+($f2*cos($f3)); #X connect 0 0 3 0; #X connect 3 0 1 0; #X connect 3 1 2 0;
Antoine
Le dim. 14 déc. 2025 à 11:56, Hrvoje Radnic via Pd-list < pd-list@lists.iem.at> a écrit :
Thank you Miller for your suggestion. I don't think that's the case, I checked the order of operations with [print] and everything looks like it should. I even made the signal version of the whole [expr] computation in order to bypass the possibility of wrong order and the result is repeated there as well. So, it must be math inside [expr], but I really struggle to find any clue.
Hrvoje Radnic
https://www.instagram.com/singlecycled/
https://pdvrecords.bandcamp.com/album/umovi-protiv-valova https://soundcloud.com/sumovi-protiv-valova 00385(0)915225162
On Saturday, November 29, 2025 at 04:40:48 PM GMT+1, Miller Puckette via Pd-list pd-list@lists.iem.at wrote:
Are you by any chance updating x before running the y calculation? If you do that, y will be calculated using the updated x and not the correct (original) one.
cheers Miller
On 11/29/25 6:49 AM, Hrvoje Radnic via Pd-list wrote:
Dear group,
I cannot figure out why the calculations inside [expr (x*cos(theta))-(y*sin(theta)); (x*sin(theta))+(y*cos(theta))] gives me wrong results.
The above mentioned formula for rotation is correct. I initialize the values through [value] object before preforming computation. The initial values are: x=1, y=0, theta=1/2pi. I expect the new x and new y to be (0,1) respectively after the rotation. But, for some reason, I get (-1,1). I checked the help files for [value] and [expr] and it looks like I am doing everything right. Anyone have an idea where's the mistake? Thank you! Hrvoje Radnic
https://urldefense.com/v3/__https://www.instagram.com/singlecycled/__;!!Mih3...
https://urldefense.com/v3/__https://pdvrecords.bandcamp.com/album/umovi-prot...
https://urldefense.com/v3/__https://soundcloud.com/sumovi-protiv-valova__;!!...
00385(0)915225162
pd-list@lists.iem.at - the Pure Data mailinglist
https://urldefense.com/v3/__https://lists.iem.at/hyperkitty/list/pd-list@lis...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management ->
https://urldefense.com/v3/__https://lists.iem.at/__;!!Mih3wA!DfrXKhsjBltnmdI...
pd-list@lists.iem.at - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/message/HB5NXTYHAO...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/
pd-list@lists.iem.at - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/message/Y2BHE7H533...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/