Osiris/API/GetAngleTo: Difference between revisions

From Divinity Engine Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 5: Line 5:
===== Return Values =====
===== Return Values =====
* '''Success/Failure''': Always succeeds.
* '''Success/Failure''': Always succeeds.
* '''_Angle''': The angle between ('''_x0''', '''_z0''') and ('''x1''', '''z1''') around the Y-axis relative to the X-axis.
* '''_Angle''': The angle between ('''_x0''', '''_z0''') and ('''_x1''', '''_z1''') around the Y-axis relative to the X-axis.
===== Notes =====
===== Notes =====
* Unlike with [[Osiris/API/GetRotation|GetRotation]], the result of this call is has no offset relative to the X-axis.
* Unlike with [[Osiris/API/GetRotation|GetRotation]], the result of this call has no offset relative to the X-axis. I.e, an angle of 0 degrees points East.
* Unlike with [[Osiris/API/GetRotation|GetRotation]], this angle increases when rotating in counter-clockwise direction.
* The returned angle is in the interval [-180, 180].
* The returned angle is in the interval [-180, 180].



Latest revision as of 21:34, 2 February 2018

Full Definition(s)
  • query GetAngleTo([in](REAL)_x0, [in](REAL)_z0, [in](REAL)_x1, [in](REAL)_z1, [out](INTEGER)_Angle)
Description

Returns the angle around the Y-axis between two points in degrees.

Return Values
  • Success/Failure: Always succeeds.
  • _Angle: The angle between (_x0, _z0) and (_x1, _z1) around the Y-axis relative to the X-axis.
Notes
  • Unlike with GetRotation, the result of this call has no offset relative to the X-axis. I.e, an angle of 0 degrees points East.
  • Unlike with GetRotation, this angle increases when rotating in counter-clockwise direction.
  • The returned angle is in the interval [-180, 180].
See Also