Garry's Mod Wiki

Garry's Mod Wiki

  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.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...