summaryrefslogtreecommitdiff
path: root/ThirdParty/tolua-5.2.4/src/tests/tpeer.h
blob: b11d1a99248c6a1f483d7b64f87e9b5c91ebbec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "tolua.h"

class Point
{
  double m_x, m_y;
public:
  Point (double x, double y)
  : m_x(x), m_y(y)
  {
  }
  double X () const
  {
    return m_x;
  }
  double Y () const
  {
    return m_y;
  }
  int gets (lua_State* L) const
  {
    tolua_pushnumber(L,m_x);
    tolua_pushnumber(L,m_y);
    return 2;
  }
};