../
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:height(): height
Overview
Gets the height of the userdata.
Returns
height: integer|nil
The number of rows in the userdata if the userdata is 2D, or nil if the userdata is 1D.
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