Difference between revisions of "Vector.new"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "Returns a table with the labels "x", "y" and "z" containing the coordinates of the vector. local a = vector.new(1, 2, 3) save(a, "vector") print(a.x) print(a.y) print(...")
 
Line 3: Line 3:
 
  local a = vector.new(1, 2, 3)
 
  local a = vector.new(1, 2, 3)
 
   
 
   
save(a, "vector")
 
 
  print(a.x)
 
  print(a.x)
 
  print(a.y)
 
  print(a.y)

Revision as of 08:55, 23 February 2013

Returns a table with the labels "x", "y" and "z" containing the coordinates of the vector.

local a = vector.new(1, 2, 3)

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