fivem-ts

a library to speed up the development of Fivem scripts and frameworks


Project maintained by Purpose-Dev Hosted on GitHub Pages — Theme by mattgraham

fivem-ts - Documentation v0.7.5Docs


fivem-ts - Documentation v0.7.5 / Shared / distance3D

Function: distance3D()

distance3D(x1, y1, z1, x2, y2, z2): number

Calculates the distance between two points in 3D space.

Parameters

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.

Returns

number

The distance between the two points.

Example

distance3D(0, 0, 0, 3, 4, 12); // 13

Defined in

shared/utils/FMath.ts:123