-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVector3.h
More file actions
60 lines (46 loc) · 1.21 KB
/
Copy pathVector3.h
File metadata and controls
60 lines (46 loc) · 1.21 KB
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
//
// Created by istvan on 27.12.19.
//
#include <iostream>
#ifndef INC_4X4X4_VECTOR3_H
#define INC_4X4X4_VECTOR3_H
class Vector3 {
public:
int x, y, z;
Vector3();
Vector3(int x, int y, int z);
/**
* Vector addition
* @param b other vector
* @return sum of the two vectors
*/
Vector3 operator+(Vector3 b);
/**
* Vector scalar multiplication
* @param b scalar
* @return product of vector and scalar
*/
Vector3 operator*(int b);
/**
* checks if any field of the vector is bigger than b
* @param b number to compare with
* @return b bigger than any field of the vector
*/
bool operator<(int b);
/**
* checks if any field of the vector is smaller than b
* @param b number to compare with
* @return b bigger than any field of the vector
*/
bool operator>(int b);
friend std::ostream &operator<<(std::ostream &output, const Vector3 &vector3) {
return output << "(" << vector3.x << ", " << vector3.y << ", " << vector3.z << ")";
}
/**
* not equals
* @param b
* @return true if any field does not equal
*/
bool operator!=(const Vector3 b);
};
#endif //INC_4X4X4_VECTOR3_H