Garry's Mod Wiki

Revision Difference

Panel:DistanceFrom#526439

<function name="DistanceFrom" parent="Panel" type="classfunc"> <description>Returns the distance between the centre of this panel object and a specified point (local to the parent panel).</description> <description><bug>Broken, do not use</bug>Returns the distance between the centre of this panel object and a specified point (local to the parent panel).</description> <realm>Client</realm> <args> <arg name="posX" type="number">The horizontal (x) position in pixels of the point to compare with. Local to the parent panel, or container.</arg> <arg name="posY" type="number">The vertical (y) position in pixels of the point to compare with. Local to the parent panel, or container.</arg> </args> <rets> <ret name="" type="number">The linear (straight-line) distance between the specified point and the centre of the panel object.</ret> </rets> </function>