../
methods
abs
add
attribs
band
bor
bxor
column
cross
distance
div
dot
get
height
idiv
magnitude
matmul
matmul2d
matmul3d
max
min
mod
mul
pow
row
set
sgn
sgn0
shl
shr
sub
transpose
width
userdata:width(): width
Overview
Gets the width of the userdata.
Returns
width: integer
The number of columns in the userdata.
Example
-- Be careful when reading the height of a userdata. It can be nil.
local h = ud:height()
if h then
for y = 0, h - 1 do
for x = 0, ud:width() - 1 do
?ud:get(x, y)
end
end
else
for x = 0, ud:width() - 1 do
?ud:get(x)
end
end