Add u64 division to LuaJIT

This commit is contained in:
Rerumu 2021-11-23 21:02:04 -05:00
parent 2a9c03249c
commit 387cc1c670

View File

@ -39,6 +39,12 @@ do
return math.floor(lhs / rhs) return math.floor(lhs / rhs)
end end
function div.u64(lhs, rhs)
if rhs == 0 then error('division by zero') end
return i64(u64(lhs) / u64(rhs))
end
end end
do do