int w_ChainShape_getPreviousVertex(lua_State *L) { ChainShape *c = luax_checkchainshape(L, 1); float x, y; if (c->getPreviousVertex(x, y)) { lua_pushnumber(L, x); lua_pushnumber(L, y); return 2; } return 0; }