Skip to content

Commit 93bb6d4

Browse files
Aarav SethiAarav Sethi
authored andcommitted
Use math.isnan and math.isinf
1 parent fae9f2e commit 93bb6d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

compiler/math.luau

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ local math_float_returns = {
4343
}
4444

4545
local math_int_returns = {
46-
isnan = function(x) return x ~= x and 1 or 0 end,
47-
isinf = function(x) return (x == math.huge or x == -math.huge) and 1 or 0 end,
46+
isnan = math.isnan,
47+
isinf = math.isinf,
4848
signbit = function(x) return x < 0 and 1 or 0 end,
4949
}
5050

0 commit comments

Comments
 (0)