Difference between revisions of "VectorA:tostring"
From ComputerCraft Wiki
(Created page with "Returns a string representation of a vector Code example: local a = vector.new(1, 2, 3) local c = a:tostring() print(c) --1,2,3") |
|||
| Line 1: | Line 1: | ||
| − | Returns a string representation of | + | {{lowercase}} |
| − | + | {{Function | |
| − | + | |name=vector:tostring | |
| − | + | |returns=[[string (type)|string]] | |
| + | |api=vector | ||
| + | |addon=ComputerCraft | ||
| + | |desc=Returns a string representation of the vector in the form of "x,y,z". | ||
| + | |examples= | ||
| + | {{Example | ||
| + | |desc=Prints the string representation of the vector. | ||
| + | |code=local a = vector.new(1, 2, 3) | ||
local c = a:tostring() | local c = a:tostring() | ||
| Line 8: | Line 15: | ||
print(c) | print(c) | ||
--1,2,3 | --1,2,3 | ||
| + | }} | ||
| + | }} | ||
| + | |||
| + | [[Category:API_Functions]] | ||
Latest revision as of 14:34, 23 February 2013
| Returns a string representation of the vector in the form of "x,y,z". | |
| Syntax | vector:tostring() |
| Returns | string |
| Part of | ComputerCraft |
| API | vector |
Examples
| Prints the string representation of the vector. | |
| Code |
local a = vector.new(1, 2, 3) local c = a:tostring() print(c) --1,2,3 |