Vector/LengthSqr

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Format.)
 
Line 2: Line 2:
 
|Name=LengthSqr
 
|Name=LengthSqr
 
|Parent=Vector
 
|Parent=Vector
|Description=Returns the squared length of the vector, this is faster than {{ClassFunction|Vector|Length}} as calculating the square root is an expensive process.
+
|Description=Returns the squared length of the vector, x² + y² + z².
 +
 
 +
This is faster than {{ClassFunction|Vector|Length}} as calculating the square root is an expensive process.
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes

Latest revision as of 15:18, 2 February 2015

 Vector:LengthSqr( )

Description

Returns the squared length of the vector, x² + y² + z².

This is faster than Vector:Length as calculating the square root is an expensive process.

Returns

number

Squared length of the vector
Personal tools
Navigation