summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-28 00:16:24 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-28 00:16:24 +0200
commit92bcd3c01d5188480793c03b2b50e97363ceb624 (patch)
tree1be7da529c5817912657471292d38f5420ec3e42
parent9dc5684fab5698fc4f8575a6f53679c67a19a7b3 (diff)
parent7499f4126495f87b3b7ac4ecc8212a9f1f5c21ac (diff)
Merge pull request #66505 from KoBeWi/floor()_and_int()_are_not_the_same_I_guess🤔
Fix wrong `floori()` behavior
-rw-r--r--core/variant/variant_utility.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp
index 7ff64c88f0..5bad27c607 100644
--- a/core/variant/variant_utility.cpp
+++ b/core/variant/variant_utility.cpp
@@ -129,7 +129,7 @@ struct VariantUtilityFunctions {
}
static inline int floori(double x) {
- return int(x);
+ return int(Math::floor(x));
}
static inline Variant ceil(Variant x, Callable::CallError &r_error) {