webasm fix

This commit is contained in:
2026-03-10 16:31:49 +03:00
parent 0ffe0c2bdc
commit 0726fdef32
2 changed files with 6 additions and 2 deletions

View File

@@ -14,8 +14,8 @@ namespace omath::lua::detail
omath_table.new_usertype<Vec2f>(
"Vec2", sol::constructors<Vec2f(), Vec2f(float, float)>(),
"x", sol::property([](const Vec2f& v) { return v.x; }, [](Vec2f& v, float val) { v.x = val; }),
"y", sol::property([](const Vec2f& v) { return v.y; }, [](Vec2f& v, float val) { v.y = val; }),
"x", sol::property([](const Vec2f& v) { return v.x; }, [](Vec2f& v, const float val) { v.x = val; }),
"y", sol::property([](const Vec2f& v) { return v.y; }, [](Vec2f& v, const float val) { v.y = val; }),
sol::meta_function::addition, sol::resolve<Vec2f(const Vec2f&) const>(&Vec2f::operator+),
sol::meta_function::subtraction, sol::resolve<Vec2f(const Vec2f&) const>(&Vec2f::operator-),