#### Archived

This topic is now archived and is closed to further replies.

# D3DXMatrixRotationY Question

This topic is 5696 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''m using D3DXMatrixRotationY(D3DXMATRIX* pOut, FLOAT Angle) to create a rotation matrix (then multiplying it by my matrix to be rotated). My question is: What value of Angle (2nd param) would rotate the matrix exactly 360 degrees (essentially rotating the matrix to the exact position it was at)? The documentation claims the value is in radians so I would think it would be exactly 2.0f, but this isn''t the case. Maybe I''ve forgotten how radians work (I haven''t been dealing directly with trig for a while). Someone please enlighten me. Thanks.

##### Share on other sites
You have to multiply it by 2PI, not just 2. PI alone would rotate you 180 degrees, do double it and you have 2PI.
I hope that's right, anyway... Whatever idiot at Microsoft decided to use radians instead of degrees should be shot.

[edited by - Riskbreaker on October 20, 2002 1:58:21 AM]

##### Share on other sites
quote:

Whatever idiot at Microsoft decided to use radians instead of degrees should be shot.

I STRONGLY disagree, I believe using radians was a great move... seeing how all trig functions such as sin and cos deal directly with radians as opposed to degrees. To have DirectX work in degrees would defeat the point of it being a low-level 3D API, as all it would do is provide extra overhead that converts from degrees to radians behind the scene. The makers of OpenGL are the ones who deserve to be shot.... degrees are for human-interaction, not for direct use in programming.

Brett

##### Share on other sites
Whoops, guess you''re right. Still doesn''t change the fact that 99% of the population hates dealing directly with radians, though.

##### Share on other sites
Why dont u use: D3DXMatrixRotationY(pOut, D3DXToRadian(360));

##### Share on other sites
Thanks, everything is in the clear now. Except the headache I get from dealing with all this mathmematics.

##### Share on other sites
quote:
Original post by Riskbreaker
Whatever idiot at Microsoft decided to use radians instead of degrees should be shot.

[edited by - Riskbreaker on October 20, 2002 1:58:21 AM]

That would be me, thanks.

xyzzy

##### Share on other sites
quote:
Whatever idiot at Microsoft decided to use radians instead of degrees should be shot.

You don''t happen to own a cream-colored van do you?

-EvilDecl81

• 9
• 9
• 13
• 41
• 15