Engine/Scripting/LuaBind.cpp
void lua_pushvec2( lua_State* L, vec2 val )
{
	lua_createtable(L, 0, 2);
	lua_pushnumber(L, val.X());
	lua_setfield(L, -2, "x");
	lua_pushnumber(L, val.Y());
	lua_setfield(L, -2, "y");
	luaL_getmetatable(L, "Apollo.vec2");
	lua_setmetatable(L, -2);
}
/**
 * Returns a vector to Lua
 * @param L A pointer to the lua_State containing the Lua stack.
 * @param val A vec2 representing the value you would like to push. This value
 * is passed as a table containing elements x and y, which are the values for x
 * and y in this argument.
 *
 * @todo Does @ref lua_pushvec2 use pass-by-value? *gasp*
 */
Returns a vector to Lua
@param L A pointer to the lua_State containing the Lua stack.
@param val A vec2 representing the value you would like to push. This value
is passed as a table containing elements x and y, which are the values for x
and y in this argument.

@todo Does @ref lua_pushvec2 use pass-by-value. *gasp
Returns a vector to Lua @param L A pointer to the lua_State containing the Lua stack . @param val A vec2 representing the value you would like to push . This value is passed as a table containing elements x and y which are the values for x and y in this argument . @todo Does @ref lua_pushvec2 use pass - by - value . * gasp
void lua_pushvec2( lua_State* L, vec2 val )
{
	lua_createtable(L, 0, 2);
	lua_pushnumber(L, val.X());
	lua_setfield(L, -2, "x");
	lua_pushnumber(L, val.Y());
	lua_setfield(L, -2, "y");
	luaL_getmetatable(L, "Apollo.vec2");
	lua_setmetatable(L, -2);
}
void lua_pushvec2 ( lua_State * L , vec2 val ) { lua_createtable ( L , 0 , 2 ) ; lua_pushnumber ( L , val . X ( ) ) ; lua_setfield ( L , -2 , " " ) ; lua_pushnumber ( L , val . Y ( ) ) ; lua_setfield ( L , -2 , " " ) ; luaL_getmetatable ( L , " " ) ; lua_setmetatable ( L , -2 ) ; }
Returns a vector to Lua
 @param L A pointer to the lua_State containing the Lua stack.
Returns a vector to Lua @param L A pointer to the lua_State containing the Lua stack .