Add u64 division to LuaJIT
This commit is contained in:
parent
2a9c03249c
commit
387cc1c670
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user