Vector.LengthSqr

From GMod Wiki

Jump to: navigation, search
Function
Syntax Vector:LengthSqr( )
Description:
Returns the squared length of the vector.
Returns: Float
In Object: Vector
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Vector.LengthSqr]Vector.LengthSqr [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGet a vector's squared length
Used onNewerShared.png
Code
print("Squared vector length is " .. Vector( 100, 0, 100 ):LengthSqr())
OutputSquared vector length is 20000


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox