So like I’m trying to see if a vector3 has a “not a number” (nan) component. How would one achieve that? It doesn’t seem to be a string
Well, NaN is the only “value” so to speak that is not equivalent to itself, so you can check whether a value is NaN by doing
local val = 0/0--example of NaN
if val ~= val then
print("val is NaN")
end
8 Likes