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-04-28 02:47:36 +0200
commit797e3130d2ae721688b53dbaa2831d441ba0138a (patch)
treea334c0cba214405a0fcf68455bfb5b3ef9168323 /src/Vector3.h
parentconvert c style casts to c++ static casts (diff)
downloadcuberite-797e3130d2ae721688b53dbaa2831d441ba0138a.tar
cuberite-797e3130d2ae721688b53dbaa2831d441ba0138a.tar.gz
cuberite-797e3130d2ae721688b53dbaa2831d441ba0138a.tar.bz2
cuberite-797e3130d2ae721688b53dbaa2831d441ba0138a.tar.lz
cuberite-797e3130d2ae721688b53dbaa2831d441ba0138a.tar.xz
cuberite-797e3130d2ae721688b53dbaa2831d441ba0138a.tar.zst
cuberite-797e3130d2ae721688b53dbaa2831d441ba0138a.zip
Diffstat (limited to '')
-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..f1fb2d257 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));