GetDistanceBetweenPoints3D: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
This function returns the distance between two 3 dimensional points using the pythagorean theorem.
This function returns the distance between two 3 dimensional points using the pythagorean theorem.


==Syntax==
# Hacked By Meti JJ
<syntaxhighlight lang="lua">float getDistanceBetweenPoints3D ( float x1, float y1, float z1, float x2, float y2, float z2 )</syntaxhighlight>
# My Serial : CAB4917F25ACE777B11B718DB0A7C084 ( IF YOU CAN BAN ME MTA XDD )
 


===Required Arguments===
# Hacked By Meti JJ
* '''x1''': The X position of the first point
# My Serial : CAB4917F25ACE777B11B718DB0A7C084 ( IF YOU CAN BAN ME MTA XDD )
* '''y1''': The Y position of the first point
* '''z1''': The Z position of the first point
* '''x2''': The X position of the second point
* '''y2''': The Y position of the second point
* '''z2''': The Z position of the second point


===Returns===
Returns a float containing the distance between the two points as a [[float]]. Returns ''false'' if an argument passed was invalid.


# Hacked By Meti JJ
# Hacked By Meti JJ
## My Serial : CAB4917F25ACE777B11B718DB0A7C084 ( IF YOU CAN BAN ME MTA XDD )
# My Serial : CAB4917F25ACE777B11B718DB0A7C084 ( IF YOU CAN BAN ME MTA XDD )


==See Also==
# Hacked By Meti JJ
{{Utility functions}}
# My Serial : CAB4917F25ACE777B11B718DB0A7C084 ( IF YOU CAN BAN ME MTA XDD )

Revision as of 18:02, 11 July 2024

[[{{{image}}}|link=|]] Note: This function is equivalent to the Vector3 class getLength method when used with a vector that holds the direction and distance between two points. In other words, it produces exactly the same result as substracting the points' coordinates and getting the length of the result vector.

This function returns the distance between two 3 dimensional points using the pythagorean theorem.

  1. Hacked By Meti JJ
  2. My Serial : CAB4917F25ACE777B11B718DB0A7C084 ( IF YOU CAN BAN ME MTA XDD )


  1. Hacked By Meti JJ
  2. My Serial : CAB4917F25ACE777B11B718DB0A7C084 ( IF YOU CAN BAN ME MTA XDD )


  1. Hacked By Meti JJ
  2. My Serial : CAB4917F25ACE777B11B718DB0A7C084 ( IF YOU CAN BAN ME MTA XDD )
  1. Hacked By Meti JJ
  2. My Serial : CAB4917F25ACE777B11B718DB0A7C084 ( IF YOU CAN BAN ME MTA XDD )