Garry's Mod Wiki

Panel:DistanceFrom

number Panel:DistanceFrom( number posX, number posY )

Description

Returns the distance between the center of this panel object and a specified point local to the parent panel.

Arguments

1 number posX
The horizontal (x) position in pixels of the point to compare with. Local to the parent panel, or container, not the panel the function is called on.
2 number posY
The vertical (y) position in pixels of the point to compare with. Local to the parent panel, or container, not the panel the function is called on.

Returns

1 number
The linear (straight-line) distance between the specified point local to parent panel and the center of this panel object.

Page Links


Special Pages


Wikis

?

Render Time: 29ms

DB GetPage 4
Generate Html 3
SaveChanges (1) 14
Render Body 0
Render Sidebar 5