summaryrefslogtreecommitdiffstats
path: root/src/Vector3i.cpp
blob: 2106aea6d9d0e358ae9c4cc84529b3aaf241c399 (plain) (blame)
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

// Vector3i.cpp

// Implements the Vector3i class representing an int-based 3D vector

#include "Globals.h"  // NOTE: MSVC stupidness requires this to be the same across all modules

#include "math.h"
#include "Vector3i.h"
#include "Vector3d.h"





Vector3i::Vector3i(const Vector3d & v) :
	x((int)v.x),
	y((int)v.y),
	z((int)v.z)
{
}





Vector3i::Vector3i(void) :
	x(0),
	y(0),
	z(0)
{
}





Vector3i::Vector3i(int a_x, int a_y, int a_z) :
	x(a_x),
	y(a_y),
	z(a_z)
{
}





void Vector3i::Move(int a_MoveX, int a_MoveY, int a_MoveZ)
{
	x += a_MoveX;
	y += a_MoveY;
	z += a_MoveZ;
}