# math.Dist

From Garry's Mod

Revision as of 19:51, 20 April 2014 by Robotboy655 (Talk | contribs)

## Contents |

# Description

This feature is deprecated.

You should avoid using it as it may be removed in a future version.

You should use math.Distance instead

You should avoid using it as it may be removed in a future version.

You should use math.Distance instead

Returns the difference between two points in 2D space. Same as math.Distance

# Arguments

number x1

X position of first point

# Arguments

number y1

Y position of first point

# Arguments

number x2

X position of second point

# Arguments

number y2

Y position of second point

# Returns

Distance between the two points.

# Examples

## Example

Demonstrates the use of this function.

print( math.Distance( 1, 2, 5, 6 ) ) -- distance bet

**Output:**

5.6568542494924