vector.new

From ComputerCraft Wiki
Revision as of 13:10, 18 July 2013 by Cranium (Talk | contribs) (Changing int to number)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Grid Redstone.png  Function vector.new
Creates a vector.
Syntax vector.new(number x, number y, number z)
Returns vector
Part of ComputerCraft
API vector

Examples

Grid paper.png  Example
Creates a vector and prints the components
Code
local a = vector.new(1, 2, 3)

print(a.x)
print(a.y)
print(a.z)
--1
--2
--3