Archived

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

trig functions in d3d header?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Alright, so ive got some rotateing to do, and i need some trig functions to do it, im assumeing d3d has some optimized functions (or just functions) for sin cos tan asin acos atan but i cant seem to find it, ive looked through msdn''s documentation of the d3dx9math file and looked at the actual source, and i cant seem to find any... does anyone know where they are? if they exist? i could just use math.h but im slightly reluctant to use old c headers (prolly nto a prob but im kinda wierd like that...) yeah, thanx

Share this post


Link to post
Share on other sites
DirectX doesn''t define trig functions. Use math.h. Regular trig functions aren''t likely to be your bottleneck anyway.

D3DX does define SIMD-enabled math functions for vertex and matrix manipulation, among other things.

I like pie.

Share this post


Link to post
Share on other sites
Don''t use the functions in math.h... you framrate will drop at least in half because they are not optimized. Actually, you should do your whole project in assembly, if you can, and not even use C++. It may even take less time to make, and it is certainly easier to debug, because the syntax is not as complicated as C++''s. Also, you don''t need to use someone else''s code (DirectX), and it isn''t good practice to use other people''s code.

If you can write your own OS to run your game in instead of Windows, you should, because it would be much more optimized.

Just some tips from an expert!

Share this post


Link to post
Share on other sites
quote:
Original post by Ademan555
...i was just asking...


I was just joking around...

Yeah, I have actually wondered that too, same with a sqaure root function. But they are all in math.h.

Share this post


Link to post
Share on other sites