Difference between revisions of "ATan2"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Entim
 
imported>Entim
(added to OBSE categories)
Line 24: Line 24:
*[[acos]]
*[[acos]]
*[[atan]]
*[[atan]]
[[Category: OBSE Functions]]
[[Category:OBSE_Math_Functions]]
[[Category:OBSE Trigonometric Functions]]

Revision as of 07:07, 14 December 2006

A command for Oblivion Script Extender

Syntax:

atan2 [float1] [float2]

Returns the angle of (float2;float1) vector

Example

set theta to atan2 y x

Notes

  • Returns a value from 0 to 180 or 0 to -180
  • From v0005, all OBSE trigonometric functions take and return degrees. Versions of the functions which accept radians are still available by prefixing the function name with an r. (i.e. ratan2)
  • This function can be used in a mathematical formula (c + atan2 a b), but a mathematical formula as the arguement for this function will not give correct result (the result of atan2 a (b + c) will be a+b+c).

See Also