mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-12 11:10:29 +00:00
Use tonumber instead of checking type
This commit is contained in:
parent
7e5970673f
commit
67eecd4b1c
@ -76,9 +76,9 @@ local vmetatable = {
|
||||
|
||||
function new( x, y, z )
|
||||
local v = {
|
||||
x = type(x) == "number" and x or 0,
|
||||
y = type(y) == "number" and y or 0,
|
||||
z = type(z) == "number" and z or 0
|
||||
x = tonumber(x) or 0,
|
||||
y = tonumber(y) or 0,
|
||||
z = tonumber(z) or 0
|
||||
}
|
||||
setmetatable( v, vmetatable )
|
||||
return v
|
||||
|
Loading…
Reference in New Issue
Block a user