Difference between revisions of "VectorA:sub"
From ComputerCraft Wiki
Line 9: | Line 9: | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc=Subtracts | + | |desc=Subtracts a vector from the initial vector and returns the resulting vector. |
|code=local a = vector.new(1, 2, 3) | |code=local a = vector.new(1, 2, 3) | ||
local b = vector.new(3, 2, 1) | local b = vector.new(3, 2, 1) |
Revision as of 11:59, 23 February 2013
Function vector:sub | |
Subtracts two vectors and returns the result | |
Syntax | vector:sub(vector vect) |
Returns | vector |
Part of | ComputerCraft |
API | vector |