Difference between revisions of "Vector.new"
From ComputerCraft Wiki
Line 6: | Line 6: | ||
|api=vector | |api=vector | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Creates | + | |desc=Creates a vector. |
|examples= | |examples= | ||
{{Example | {{Example |
Revision as of 11:57, 23 February 2013
Function vector.new | |
Creates a vector. | |
Syntax | vector.new(float x, float y, float z) |
Returns | vector |
Part of | ComputerCraft |
API | vector |
Examples
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 |