blob: 1679155a20de8d4fe5b98bcb68f2e17b405c9d51 (
plain)
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
|
/**
* c_sxyz.cpp
*
*/
#include "SSystem/SComponent/c_sxyz.h"
const csXyz csXyz::Zero = csXyz(0, 0, 0);
csXyz::csXyz(s16 x, s16 y, s16 z) {
this->x = x;
this->y = y;
this->z = z;
}
csXyz csXyz::operator+(csXyz& other) {
return csXyz(x + other.x, y + other.y, z + other.z);
}
void csXyz::operator+=(csXyz& other) {
x += other.x;
y += other.y;
z += other.z;
}
csXyz csXyz::operator-(csXyz& other) {
return csXyz(x - other.x, y - other.y, z - other.z);
}
csXyz csXyz::operator*(f32 mul) {
return csXyz(x * mul, y * mul, z * mul);
}
|