There was an error while loading. Please reload this page.
Retrieves a global metatable, previously registered with RegisterMetatable, by its name.
GetMetatable(name: string) -> mt: table | nil
GetMetatable
string
table
nil
name
mt
A code which adds a DotProduct method to Vec2.
DotProduct
Vec2
local vec2meta = GetMetatable("vec2") function vec2meta:DotProduct(vec) AssertMetatable(vec, "vec2") return self.x * vec.x + self.y * vec.y end