Arctangent
Would someone please explain the arctangent function to me, I'm confused. floatatan takes an angle and a radix. Isn't arctangent supposed to go from a number to an angle? And what is a radix? floatatan2 takes x, y and a radix. I'm still confused...
Thanks in advance. |
Well, I'm not really good at this stuff but have done some... things with it over the weeks.
Code:
floatatan returns radians. Which could be converted to degrees: degrees = radians * 180 / pi I think floatatan maybe can be set up to return degrees directly, although I think I had a problem with that for some reason. |
sry for this off-topic post, but for what purpose would u need arc's and tangets for? (Other than math class.)
|
Alright, I ended up using floatatan2 but I finally got it to work. I can get to polar coordinates with fairly good accuracy but I can't get back to rectangular nicely...
Code:
This is what I have...any ideas as to the accuracy of the rectangular coordinates? Maybe variable accuracy? something else? I'll keep looking. |
I use floatatan as an integral part in these plugins: Sentry guns and Enemy spotted
Feels wonderful to get a real use of those. :-) |
You're no help! :D I suppose I'll just have to test how inaccurate it becomes in the real game <- LOL.
|
| All times are GMT -4. The time now is 19:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.