Raised This Month: $ Target: $400
 0% 

floatatan


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 04-25-2006 , 22:32   floatatan
Reply With Quote #1

Do I have the wrong syntax here or something, or is AMXX's floatatan function just not working:
Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     server_print("%f",floatatan(1.0,degrees)) }

Prints:
0.99989

for those of you who do not know, atan of 1 is actually:
degrees - 45
radians - 0.785...
gradiens - 50

Edit:
floatatan2 appears to work when I insert the 1.0 and 1.0. I'll use this as I do have both measurements of the legs of the traingle, i would however like to know what I did wrong with the floatatan syntax (or if the func is broked)
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 04-25-2006 , 22:48  
Reply With Quote #2

think floatasin works? testage.

Edit: good, floatasin works.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
KoST
Senior Member
Join Date: Jul 2005
Old 04-25-2006 , 22:57  
Reply With Quote #3

with radix set to 10 this
Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     server_print("%f",floatatan(1.0,10)) }
outputs correct radians value:
Code:
0.785398
__________________
KoST is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 04-25-2006 , 22:58  
Reply With Quote #4

and i get degrees by: _______

and why is it 10 for radians?
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
KoST
Senior Member
Join Date: Jul 2005
Old 04-25-2006 , 23:02  
Reply With Quote #5

1 radians = 57.2957795 degree

hmm didn't find out how to get degree returned

[edit] why 10 for radians? don't know (should be 1 actually)
__________________
KoST is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode