forked from rcatolino/bubbles-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvector.h
More file actions
32 lines (28 loc) · 735 Bytes
/
vector.h
File metadata and controls
32 lines (28 loc) · 735 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
#ifndef VECTOR_H
#define VECTOR_H
#include "actor.h"
class vector
{
public:
vector();
vector(float x, float y, float z);
vector(const Actor &a);
vector(const Actor *a);
vector(int x, int y, int z);
vector(const vector &v);
void operator =(const vector &v);
float dotProduct(const vector &v) const;
vector operator +(const vector &v) const;
vector operator -(const vector &v) const;
bool operator ==(const vector &v) const;
vector operator *(float a) const;
vector operator *(int a) const;
vector operator *(const vector &v) const;
float norm() const;
float getX() const;
float getY() const;
float getZ() const;
private:
float x,y,z;
};
#endif // VECTOR_H