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 / distance2D
distance2D(
x1
,y1
,x2
,y2
):number
Calculates the distance between two points in 2D space.
• x1: number
The x-coordinate of the first point.
• y1: number
The y-coordinate of the first point.
• x2: number
The x-coordinate of the second point.
• y2: number
The y-coordinate of the second point.
number
The distance between the two points.
distance2D(0, 0, 3, 4); // 5