Panel/DistanceFrom

From Garry's Mod
Jump to: navigation, search
 Panel:DistanceFrom( )

Contents

Description

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

Arguments

number posX

The horizontal (x) position in pixels of the point to compare with. Local to the parent panel, or container.

Arguments

number posY

The vertical (y) position in pixels of the point to compare with. Local to the parent panel, or container.

Returns

number

The linear (straight-line) distance between the specified point and the centre of the panel object.
Personal tools
Navigation