aboutsummaryrefslogtreecommitdiff
path: root/core/math/math_2d.cpp
diff options
context:
space:
mode:
authorAlexander Alekseev2018-05-04 10:24:48 +0300
committerAlexander Alekseev2018-05-04 12:43:50 +0300
commit26963473a9d832f18e05db074577511d2477a42a (patch)
tree4aa688c35d6aaa61d544312b7b2b61de53119be6 /core/math/math_2d.cpp
parentd6ddfdf004a1b5a334a0709e87e2e427624e616b (diff)
downloadgodot-26963473a9d832f18e05db074577511d2477a42a.tar.gz
godot-26963473a9d832f18e05db074577511d2477a42a.tar.zst
godot-26963473a9d832f18e05db074577511d2477a42a.zip
Diffstat (limited to 'core/math/math_2d.cpp')
-rw-r--r--core/math/math_2d.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/math/math_2d.cpp b/core/math/math_2d.cpp
index 3767d298a..a053ffbd9 100644
--- a/core/math/math_2d.cpp
+++ b/core/math/math_2d.cpp
@@ -103,6 +103,16 @@ Vector2 Vector2::floor() const {
return Vector2(Math::floor(x), Math::floor(y));
}
+Vector2 Vector2::ceil() const {
+
+ return Vector2(Math::ceil(x), Math::ceil(y));
+}
+
+Vector2 Vector2::round() const {
+
+ return Vector2(Math::round(x), Math::round(y));
+}
+
Vector2 Vector2::rotated(real_t p_by) const {
Vector2 v;