AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   floatatan (https://forums.alliedmods.net/showthread.php?t=22106)

GHW_Chronic 12-18-2005 20:05

floatatan
 
Ok, I got all 3 sides of my triangle

Code:

|\
 |q\
 |  \ Z
Y|  \
 |    \
 ------
  X

Now I need to find angle q.
Tan(q) = X/Y
tan-1(tan(q)) = angle of q

so now I need to know how to use the inverse tangent (atan) command

The only thing that confuses me is in funcwiki it says
Float: floatatan(Float:angle,radix)

new Float:angleq = floatatan(X/Y,degrees)

It says Float:angle but we want to find the angle using the arctan yet it says to specify the angle (Float:angle). Is this just a typo or is the atan command not arctan?

GHW_Chronic 12-18-2005 20:15

What I'm trying to say I guess is that if that command is the atan, which it says in it (floatatan) and the first argument we have to supply is the tangent of the angle to find the angle, then funcwiki should say something like:

Float: floatatan(Float:tangent,radix)


All times are GMT -4. The time now is 15:57.

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