Revision Difference
math.Dist#511580
<function name="Dist" parent="math" type="libraryfunc">⤶
<description>⤶
<deprecated>You should use <page>math.Distance</page> instead</deprecated>⤶
⤶
Returns the difference between two points in 2D space. Alias of <page>math.Distance</page>.⤶
</description>⤶
<realm>Shared and Menu</realm>⤶
<file line="11">lua/includes/extensions/math.lua</file>⤶
<args>⤶
<arg name="x1" type="number">X position of first point</arg>⤶
<arg name="y1" type="number">Y position of first point</arg>⤶
<arg name="x2" type="number">X position of second point</arg>⤶
<arg name="y2" type="number">Y position of second point</arg>⤶
</args>⤶
<rets>⤶
<ret name="" type="number">Distance between the two points.</ret>⤶
</rets>⤶
</function>⤶
⤶
<example>⤶
<description>Demonstrates the use of this function.</description>⤶
<code>print( math.Distance( 1, 2, 5, 6 ) ) -- distance bet</code>⤶
<output>5.6568542494924</output>⤶
⤶
</example>