Rectangle class
Dependents: FollowMeBot FollowMeBot FollowMeBot3 FollowMeBot
Fork of Rectangle by
Rectangle.h@1:d9c0709ba2ce, 2013-11-18 (annotated)
- Committer:
- dhamilton31
- Date:
- Mon Nov 18 21:09:00 2013 +0000
- Revision:
- 1:d9c0709ba2ce
- Parent:
- 0:19fca77774b6
this class is not that great.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
projetremote | 0:19fca77774b6 | 1 | #include "mbed.h" |
projetremote | 0:19fca77774b6 | 2 | |
projetremote | 0:19fca77774b6 | 3 | class Rectangle { |
projetremote | 0:19fca77774b6 | 4 | protected : |
dhamilton31 | 1:d9c0709ba2ce | 5 | int x1, x2, y1, y2; |
projetremote | 0:19fca77774b6 | 6 | |
projetremote | 0:19fca77774b6 | 7 | |
projetremote | 0:19fca77774b6 | 8 | public : |
dhamilton31 | 1:d9c0709ba2ce | 9 | Rectangle(int x,int y, int x2, int y2); |
projetremote | 0:19fca77774b6 | 10 | |
projetremote | 0:19fca77774b6 | 11 | bool is_touch(int x_touch, int y_touch); |
projetremote | 0:19fca77774b6 | 12 | |
projetremote | 0:19fca77774b6 | 13 | int getX1(); |
projetremote | 0:19fca77774b6 | 14 | |
projetremote | 0:19fca77774b6 | 15 | int getX2(); |
projetremote | 0:19fca77774b6 | 16 | |
projetremote | 0:19fca77774b6 | 17 | int getY1(); |
projetremote | 0:19fca77774b6 | 18 | |
projetremote | 0:19fca77774b6 | 19 | int getY2(); |
projetremote | 0:19fca77774b6 | 20 | |
dhamilton31 | 1:d9c0709ba2ce | 21 | int getCenterX(); |
dhamilton31 | 1:d9c0709ba2ce | 22 | |
dhamilton31 | 1:d9c0709ba2ce | 23 | int getCenterY(); |
dhamilton31 | 1:d9c0709ba2ce | 24 | |
projetremote | 0:19fca77774b6 | 25 | }; |