summaryrefslogtreecommitdiffstats
path: root/src/Vector3.h
diff options
context:
space:
mode:
authorWoazboat <f.kargl@posteo.de>2015-04-28 02:47:36 +0200
committerWoazboat <f.kargl@posteo.de>2015-05-08 15:12:32 +0200
commitc74bfc35d61022c1d1e660935601d461b39b8b88 (patch)
tree4e156383745ae637976a7c93757e5ea02fe78ce9 /src/Vector3.h
parentChanged Tracer::m_NormalTable to static array (diff)
downloadcuberite-c74bfc35d61022c1d1e660935601d461b39b8b88.tar
cuberite-c74bfc35d61022c1d1e660935601d461b39b8b88.tar.gz
cuberite-c74bfc35d61022c1d1e660935601d461b39b8b88.tar.bz2
cuberite-c74bfc35d61022c1d1e660935601d461b39b8b88.tar.lz
cuberite-c74bfc35d61022c1d1e660935601d461b39b8b88.tar.xz
cuberite-c74bfc35d61022c1d1e660935601d461b39b8b88.tar.zst
cuberite-c74bfc35d61022c1d1e660935601d461b39b8b88.zip
Diffstat (limited to 'src/Vector3.h')
-rw-r--r--src/Vector3.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Vector3.h b/src/Vector3.h
index 36f277ba4..a42003aae 100644
--- a/src/Vector3.h
+++ b/src/Vector3.h
@@ -78,6 +78,11 @@ public:
);
}
+ inline bool HasNonZeroLength(void) const
+ {
+ return ((x != 0) || (y != 0) || (z != 0));
+ }
+
inline double Length(void) const
{
return sqrt(static_cast<double>(x * x + y * y + z * z));