Gameplay::getHeadingFromVector2d: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
No edit summary
 
Line 1: Line 1:
dx = x1 - x2<br>dy = y1 - y2
{{ClientsideJsFunction}}
{{JSContainer|
Gets a heading in degrees between x and y points.
 
===Required Params===
*'''x:''' {{RageType|float}}
*'''y:''' {{RageType|float}}
 
===Return value===
*''' {{RageType|float}} '''
 
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.gameplay.getHeadingFromVector2d(dx, dy);</syntaxhighlight>
<syntaxhighlight lang="javascript">
=== Required Arguments ===
mp.game.gameplay.getHeadingFromVector2d(x, y);
*'''dx:''' float
</syntaxhighlight>
*'''dy:''' float
 
===Return value===
*'''float'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
//todo
</syntaxhighlight>
</syntaxhighlight>
}}
==See also==
==See also==
{{Gameplay_s_function_c}}
{{Gameplay_definition_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 12:06, 29 April 2024

Client-Side
Function

 JavaScript



JavaScript Syntax

Gets a heading in degrees between x and y points.

Required Params

  • x: float
  • y: float

Return value

  • float

Syntax

mp.game.gameplay.getHeadingFromVector2d(x, y);

Example

//todo


See also