Skip to content

Commit

Permalink
Merge pull request #466 from joelverhagen/modf
Browse files Browse the repository at this point in the history
Add modf implementation in classic
  • Loading branch information
yanghuan authored Jan 4, 2024
2 parents eb37e47 + 507f5eb commit 5cc3d00
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CSharp.lua/CoreSystem.Lua/CoreSystem/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,14 @@ else
return v
end
function System.modf(x, y)
local v = x % y
if v ~= 0 and x * y < 0 then
return v - y
end
return v
end
local function toUInt(v, max, mask, checked)
if v >= 0 and v <= max then
return v
Expand Down

0 comments on commit 5cc3d00

Please sign in to comment.