diff options
author | Woazboat <f.kargl@posteo.de> | 2015-04-28 02:47:36 +0200 |
---|---|---|
committer | Woazboat <f.kargl@posteo.de> | 2015-04-28 02:47:36 +0200 |
commit | 797e3130d2ae721688b53dbaa2831d441ba0138a (patch) | |
tree | a334c0cba214405a0fcf68455bfb5b3ef9168323 /src/Vector3.h | |
parent | convert c style casts to c++ static casts (diff) | |
download | cuberite-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.h | 5 |
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)); |