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://www.instagram.com/singlecycled/ <https://urldefense.com/v3/__https://www.instagram.com/singlecycled/__;!!Mih3wA!DfrXKhsjBltnmdIUutLHu6UcsuMDJK4Q2d1t_PgsPezZ7FFjjwd46jjfXesqm2Rx6ggHKPDjhNcNbhmE$>

https://pdvrecords.bandcamp.com/album/umovi-protiv-valova <https://urldefense.com/v3/__https://pdvrecords.bandcamp.com/album/umovi-protiv-valova__;!!Mih3wA!DfrXKhsjBltnmdIUutLHu6UcsuMDJK4Q2d1t_PgsPezZ7FFjjwd46jjfXesqm2Rx6ggHKPDjhEqqX9g8$> https://soundcloud.com/sumovi-protiv-valova <https://urldefense.com/v3/__https://soundcloud.com/sumovi-protiv-valova__;!!Mih3wA!DfrXKhsjBltnmdIUutLHu6UcsuMDJK4Q2d1t_PgsPezZ7FFjjwd46jjfXesqm2Rx6ggHKPDjhLRt9iry$>
00385(0)915225162

---
[email protected] - the Pure Data mailinglist
https://urldefense.com/v3/__https://lists.iem.at/hyperkitty/list/[email protected]/message/FVTCX5A323GUEEZXZWNLAY5YFNK7GP74/__;!!Mih3wA!DfrXKhsjBltnmdIUutLHu6UcsuMDJK4Q2d1t_PgsPezZ7FFjjwd46jjfXesqm2Rx6ggHKPDjhNKdlmmG$

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://urldefense.com/v3/__https://lists.iem.at/__;!!Mih3wA!DfrXKhsjBltnmdIUutLHu6UcsuMDJK4Q2d1t_PgsPezZ7FFjjwd46jjfXesqm2Rx6ggHKPDjhGLejGa2$


---
[email protected] - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/HB5NXTYHAOSMVFG7BAWDEA62HF5W4KXG/

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/

Reply via email to