summaryrefslogtreecommitdiffstats
path: root/src/Vector3.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-04-18 11:44:35 +0200
committerGitHub <noreply@github.com>2020-04-18 11:44:35 +0200
commita55f61548ef050f29aab96095b80af4c9f046281 (patch)
tree4c03607df6b5dd97af28f9748493a1bb26fd5d50 /src/Vector3.h
parentFixing washing away of redstone mechanisms (#4665) (diff)
downloadcuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar
cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar.gz
cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar.bz2
cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar.lz
cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar.xz
cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar.zst
cuberite-a55f61548ef050f29aab96095b80af4c9f046281.zip
Diffstat (limited to 'src/Vector3.h')
-rw-r--r--src/Vector3.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Vector3.h b/src/Vector3.h
index 1847baf5b..b3d54514b 100644
--- a/src/Vector3.h
+++ b/src/Vector3.h
@@ -178,6 +178,16 @@ public:
);
}
+ /** Returns a new Vector3i with coords set to std::ceil() of this vector's coords. */
+ inline Vector3<int> Ceil() const
+ {
+ return Vector3<int>(
+ CeilC(x),
+ CeilC(y),
+ CeilC(z)
+ );
+ }
+
// tolua_end
inline bool operator != (const Vector3<T> & a_Rhs) const