Garry's Mod Wiki

Panel:Distance

  number Panel:Distance( Panel tgtPanel )

Description

Returns the linear distance from the center of this panel object and another. Both panels must have the same parent for this function to work properly.

Arguments

1 Panel tgtPanel
The target object with which to compare position.

Returns

1 number
The linear (straight-line) distance between the center of the two objects.