Vector.Sub

From GMod Wiki

Jump to: navigation, search
Function
Syntax Vector:Sub( Vector vec )
Description:
Will subtract one vector from another
Returns: nil
In Object: Vector
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Vector.Sub]Vector.Sub [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionSubtracts one vector from another
Used onNewerShared.png
Code
local vec1 = Vector(4,5,6)
local vec2 = Vector(1,2,3)
vec1:Sub(vec2)
print(vec1)
 
OutputA Vector of 3.0000 3.0000 3.0000
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox