Gameplay::getAngleBetween2dVectors: Difference between revisions
(yay) |
No edit summary |
||
| Line 1: | Line 1: | ||
{{ClientsideJsFunction}} | |||
{{JSContainer| | |||
Gets the angle in degrees between 2 given points | |||
===Required Params=== | |||
*'''x1:''' {{RageType|float}} | |||
*'''y1:''' {{RageType|float}} | |||
*'''x2:''' {{RageType|float}} | |||
*'''y2:''' {{RageType|float}} | |||
===Return value=== | |||
*''' {{RageType|float}} ''' | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript">mp.game.gameplay.getAngleBetween2dVectors(x1, y1, x2, y2);</syntaxhighlight> | <syntaxhighlight lang="javascript"> | ||
mp.game.gameplay.getAngleBetween2dVectors(x1, y1, x2, y2); | |||
</syntaxhighlight> | |||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
// todo | //todo | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
==See also== | ==See also== | ||
{{ | {{Gameplay_definition_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
[[Category:TODO: Example]] | [[Category:TODO: Example]] | ||
Latest revision as of 12:05, 29 April 2024
Client-Side Function
JavaScript Syntax
Gets the angle in degrees between 2 given points
Required Params
- x1: float
- y1: float
- x2: float
- y2: float
Return value
- float
Syntax
mp.game.gameplay.getAngleBetween2dVectors(x1, y1, x2, y2);
Example
//todo