Skip to content

Commit

Permalink
add NaN checks where missing
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdotink committed Oct 8, 2023
1 parent 7628101 commit ede8c7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions libs/Guard/Guard.luau
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,14 @@ end

local CFrame: Check<CFrame> = function(Value)
assert(typeof(Value) == "CFrame")
assert(Value == Value)

return Value
end

local Color3: Check<Color3> = function(Value)
assert(typeof(Value) == "Color3")
assert(Value == Value)

return Value
end
Expand All @@ -189,6 +191,7 @@ end

local Vector2: Check<Vector2> = function(Value)
assert(typeof(Value) == "Vector2")
assert(Value == Value)

return Value
end
Expand All @@ -201,6 +204,7 @@ end

local Vector3: Check<Vector3> = function(Value)
assert(typeof(Value) == "Vector3")
assert(Value == Value)

return Value
end
Expand Down
2 changes: 1 addition & 1 deletion libs/Guard/wally.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "red-blox/guard"
version = "1.0.0"
version = "1.0.1"
registry = "https://github.com/UpliftGames/wally-index"
realm = "shared"

Expand Down

0 comments on commit ede8c7a

Please sign in to comment.