ToString

Converts an Object into a human-readable string for debugging, file IO, or other purposes. The Vec3 class, for example, will return a string in the format "x, y, z".

Syntax

Returns

A human-readable string describing the object.

Example

window=Window:Create()
context=Context:Create(window)

while true do
if window:Closed() or window:KeyHit(Key.Escape) then return false end

context:SetColor(0,0,0)
context:Clear()

--Create an object
local aabb = AABB(-10,-10,-10,10,10,10)

context:SetColor(1,1,1)
context:SetBlendMode(Blend.Alpha)
context:DrawText(aabb:ToString(),2,2)
context:SetBlendMode(Blend.Solid)

context:Sync()

end