vector.tostring

From ComputerCraft
Jump to: navigation, search

vector.tostring
Function
Syntax
vector.tostring()
Colon notation: self:tostring()

Returns string vector
API vector
Source CC:Tweaked (source)

Given a vector, self, this function will create a new string out of the vector's components. This can also be written as print(self). If self does not follow Computercraft's vector style (a table with the contents: x, y, and z) the function will error.

ExampleExamplePrint a vector
Prints our vector
Code
local myVector = vector.new(240, 71, -3040)
print("My new vector has the components:", myVector)
Output My new vector has the components: 240 71 -3040