-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPoint.cpp
More file actions
67 lines (49 loc) · 800 Bytes
/
Point.cpp
File metadata and controls
67 lines (49 loc) · 800 Bytes
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#define _CRT_SECURE_NO_WARNINGS
#include "Point.h"
using namespace std;
//C'tor
Point::Point(double x, double y)
{
_x = x;
_y = y;
_scaleX = 1;
_scaleY = 1;
}
//Defulte C'tor
Point::Point()
{
_x = 0;
_y = 0;
_scaleX = 1;
_scaleY = 1;
}
//return X
double Point::getX() const
{
return _x*_scaleX;
}
//return Y
double Point::getY() const
{
return _y*_scaleY;
}
//Variable placement operation _x
void Point::setX(double x)
{
_x = x;
}
//Variable placement operation _y
void Point::setY(double y)
{
_y = y;
}
//Expansion / contraction value of X
void Point::setScaleX(double scaleX)
{
_scaleX = scaleX;
}
//Expansion / contraction value of Y
void Point::setScaleY(double scaleY)
{
_scaleY = scaleY;
}