summaryrefslogtreecommitdiffstats
path: root/source/Vector3d.h
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-01-19 19:12:39 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-01-19 19:12:39 +0100
commit50a7722242197f9a3b4300e154c1e66d1177839a (patch)
treeebf80972e3fe85806c1df037579e9a20992b5766 /source/Vector3d.h
parentFixed crashing bug in cClientHandle::~cClientHandle (diff)
downloadcuberite-50a7722242197f9a3b4300e154c1e66d1177839a.tar
cuberite-50a7722242197f9a3b4300e154c1e66d1177839a.tar.gz
cuberite-50a7722242197f9a3b4300e154c1e66d1177839a.tar.bz2
cuberite-50a7722242197f9a3b4300e154c1e66d1177839a.tar.lz
cuberite-50a7722242197f9a3b4300e154c1e66d1177839a.tar.xz
cuberite-50a7722242197f9a3b4300e154c1e66d1177839a.tar.zst
cuberite-50a7722242197f9a3b4300e154c1e66d1177839a.zip
Diffstat (limited to 'source/Vector3d.h')
-rw-r--r--source/Vector3d.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/Vector3d.h b/source/Vector3d.h
index 84b04fce7..f93c2c763 100644
--- a/source/Vector3d.h
+++ b/source/Vector3d.h
@@ -22,6 +22,8 @@ public: //tolua_export
inline double Dot( const Vector3d & a_V ) const { return x * a_V.x + y * a_V.y + z * a_V.z; } //tolua_export
inline Vector3d Cross( const Vector3d & v ) const { return Vector3d( y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x ); } //tolua_export
+ inline bool Equals( const Vector3d & v ) const { return (x == v.x && y == v.y && z == v.z ); } //tolua_export
+
void operator += ( const Vector3d& a_V ) { x += a_V.x; y += a_V.y; z += a_V.z; }
void operator += ( Vector3d* a_V ) { x += a_V->x; y += a_V->y; z += a_V->z; }
void operator -= ( const Vector3d& a_V ) { x -= a_V.x; y -= a_V.y; z -= a_V.z; }