a library to speed up the development of Fivem scripts and frameworks
fivem-ts - Documentation v0.7.5 • Docs
fivem-ts - Documentation v0.7.5 / Shared / distance3D
distance3D(
x1
,y1
,z1
,x2
,y2
,z2
):number
Calculates the distance between two points in 3D space.
• x1: number
The x-coordinate of the first point.
• y1: number
The y-coordinate of the first point.
• z1: number
The z-coordinate of the first point.
• x2: number
The x-coordinate of the second point.
• y2: number
The y-coordinate of the second point.
• z2: number
The z-coordinate of the second point.
number
The distance between the two points.
distance3D(0, 0, 0, 3, 4, 12); // 13