/
point.h
38 lines (29 loc) · 808 Bytes
/
point.h
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
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef POINT_H
#define POINT_H
#define X first
#define Y second
#include <utility>
#include <cmath>
float _abs(float _x);
float _max(float a, float b);
float _min(float a, float b);
class point{
std::pair<float, float> m_coords;
std::pair<float, float> m_pvector;
std::pair<float, float> m_fvector;
public:
point(float x, float y);
point();
unsigned mass;
void move(float);
void applysecondnewtonlaw(float);
void bounce(std::pair<float, float>);
void setpulse(std::pair<float, float>);
void addpulse(std::pair<float, float>);
void setforce(std::pair<float, float>);
std::pair<float, float> getforce();
void addforce(std::pair<float, float>);
std::pair<float, float> getcoords();
void setcoords(float x, float y);
};
#endif // POINT_H