-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeometria.h
67 lines (49 loc) · 1.11 KB
/
geometria.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
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
#ifndef GEOMETRIA_H
#define GEOMETRIA_H
#include <cmath>
#include <iostream>
namespace geometria{
class Ponto;
class Vetor;
class Ponto{
private:
double x, y;
public:
Ponto();
Ponto(double x, double y);
void setX(double x);
double getX();
void setY(double y);
double getY();
Ponto operator+(Vetor);
Ponto operator-(Vetor);
Ponto rotacionado(Ponto p, double angulo);
};
class Vetor{
private:
double x, y, norma;
public:
Vetor();
Vetor(double x, double y);
Vetor(Ponto a, Ponto b);
void setX(double x);
double getX();
void setY(double y);
double getY();
double getNorma();
void calculaNorma();
double operator*(Vetor);
Vetor operator^(Vetor);
Vetor operator*(double k);
Vetor operator+=(Vetor);
Vetor operator-=(Vetor);
Vetor operator*=(Vetor);
Vetor operator/=(Vetor);
double anguloCom(Vetor v);
double anguloCom_(Vetor v);
Vetor rotacionado(double angulo);
Vetor normalizado();
Vetor normal();
};
}
#endif