Vector.Length

From GMod Wiki

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



Examples

DescriptionGet a vector's length
Used onNewerShared.png
Code
print("Vector length is " .. Vector( 100, 0, 100 ):Length())
OutputVector length is 141.42135620117


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox