math/Dist

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Func |Name=Dist |Parent=math |Description= |Realm=Shared |IsClass=No }}")
 
Line 2: Line 2:
 
|Name=Dist
 
|Name=Dist
 
|Parent=math
 
|Parent=math
|Description=
+
|Description=Returns the difference between two points in 2D space
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=No
 
|IsClass=No
 +
}}
 +
{{Arg
 +
|type=number
 +
|name=x1
 +
|desc=X position of first point
 +
}}
 +
{{Arg
 +
|type=number
 +
|name=y1
 +
|desc=Y position of first point
 +
}}
 +
{{Arg
 +
|type=number
 +
|name=x2
 +
|desc=X position of second point
 +
}}
 +
{{Arg
 +
|type=number
 +
|name=y2
 +
|desc=Y position of second point
 +
}}
 +
{{Ret
 +
|type=number
 +
|desc=Difference
 
}}
 
}}

Revision as of 12:41, 4 June 2013

 math.Dist( )

Contents

Description

Returns the difference between two points in 2D space

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

number

Difference
Personal tools
Navigation