summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-28 10:08:30 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-28 10:08:30 +0200
commit89f2096a056c749843a0efbb1aff33a02d2406a4 (patch)
treeba41973e23f7bd3ff0ba3efcaee35be1cdbf2a1a /core
parent45d003318863fdb1db634941657f89ef66ddb931 (diff)
parent52b20ce90931d50155550dd7ac083224d0d0128e (diff)
Merge pull request #66518 from KoBeWi/bits_unleashed
Use 64bit integers in utility methods
Diffstat (limited to 'core')
-rw-r--r--core/variant/variant_utility.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp
index 5bad27c607..670b66d53e 100644
--- a/core/variant/variant_utility.cpp
+++ b/core/variant/variant_utility.cpp
@@ -128,8 +128,8 @@ struct VariantUtilityFunctions {
return Math::floor(x);
}
- static inline int floori(double x) {
- return int(Math::floor(x));
+ static inline int64_t floori(double x) {
+ return int64_t(Math::floor(x));
}
static inline Variant ceil(Variant x, Callable::CallError &r_error) {
@@ -161,8 +161,8 @@ struct VariantUtilityFunctions {
return Math::ceil(x);
}
- static inline int ceili(double x) {
- return int(Math::ceil(x));
+ static inline int64_t ceili(double x) {
+ return int64_t(Math::ceil(x));
}
static inline Variant round(Variant x, Callable::CallError &r_error) {
@@ -194,8 +194,8 @@ struct VariantUtilityFunctions {
return Math::round(x);
}
- static inline int roundi(double x) {
- return int(Math::round(x));
+ static inline int64_t roundi(double x) {
+ return int64_t(Math::round(x));
}
static inline Variant abs(const Variant &x, Callable::CallError &r_error) {