Code:
self.OpcodeTable[269] = function (Param1, Param2) //VLEN
if (self.VMODE == 2) then
local vec = self:Read2f(Param1)
self:WriteCell(Param1,(vec.x * vec.x + vec.y * vec.y)^(0.5))
else
local vec = self:Read3f(Param1)
self:WriteCell(Param1,(vec.x * vec.x + vec.y * vec.y + vec.z * vec.z)^(0.5))
end
end
Should be
Code:
self.OpcodeTable[269] = function (Param1, Param2) //VLEN
if (self.VMODE == 2) then
local vec = self:Read2f(Param2)
self:WriteCell(Param1,(vec.x * vec.x + vec.y * vec.y)^(0.5))
else
local vec = self:Read3f(Param2)
self:WriteCell(Param1,(vec.x * vec.x + vec.y * vec.y + vec.z * vec.z)^(0.5))
end
end
It was vector reading from Param1 not the vector of Param2.
Bookmarks