Vector3::round, Vector2::round & Vector2::ceil methods were added.

Now both structs (Vector2 & Vector3) have round, floor & ceil methods.
(see #18603)
This commit is contained in:
Alexander Alekseev
2018-05-04 10:24:48 +03:00
parent d6ddfdf004
commit 26963473a9
4 changed files with 24 additions and 0 deletions

View File

@@ -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;