Garry's Mod Wiki

math.DistanceSqr

math.DistanceSqr

  number math.DistanceSqr( number x1, number y1, number x2, number y2 )

Description

Returns the squared difference between two points in 2D space. This is computationally faster than math.Distance.

Arguments

1 number x1
X position of first point
2 number y1
Y position of first point
3 number x2
X position of second point
4 number y2
Y position of second point

Returns

1 number
The squared distance between the two points.

Special Pages


Wikis

?

Render Time: 28ms

DB GetPage 4
Generate Html 6
SaveChanges (1) 8
Render Body 0
Render Sidebar 7