limit printpos accuracy to 3 after .

This commit is contained in:
sapier 2013-08-17 11:53:19 +02:00
parent f7fd763d48
commit 8c02ff3fc2

View File

@ -30,9 +30,12 @@
function printpos(pos)
if pos ~= nil then
if pos.y ~= nil then
return "("..pos.x..","..pos.y..","..pos.z..")"
return "("..string.format("%3f",pos.x)..","
..string.format("%3f",pos.y)..","
..string.format("%3f",pos.z)..")"
else
return "("..pos.x..", ? ,"..pos.z..")"
return "("..string.format("%3f",pos.x)..", ? ,"
..string.format("%3f",pos.z)..")"
end
end
return ""