Difference between revisions of "Vector.new"
From ComputerCraft Wiki
| Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
{{Function | {{Function | ||
| − | |name=vector. | + | |name=vector.new |
|args=[[float (type)|float]] x, [[float (type)|float]] y, [[float (type)|float]] z | |args=[[float (type)|float]] x, [[float (type)|float]] y, [[float (type)|float]] z | ||
|api=vector | |api=vector | ||
Revision as of 11:26, 23 February 2013
| Creates and returns a vector with the specified coordinates. | |
| Syntax | vector.new(float x, float y, float z) |
| Returns | nil |
| Part of | ComputerCraft |
| API | vector |
Examples
| 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 |