summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorChaosus <chaosus89@gmail.com>2019-02-25 10:51:04 +0300
committerChaosus <chaosus89@gmail.com>2019-02-25 10:51:04 +0300
commitbc4d7812773eabe93446f05563b0a0637fdaac74 (patch)
treeb4bfb34139df0c64f17a463e02b70b95b476704b /core
parent88a36e20cb09b3843c81e9f6dfd589fc3a269cd0 (diff)
Fix wrapi to use int64_t instead int
Diffstat (limited to 'core')
-rw-r--r--core/math/math_funcs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h
index f8f5ddfeaa..f2234d5dd6 100644
--- a/core/math/math_funcs.h
+++ b/core/math/math_funcs.h
@@ -217,8 +217,8 @@ public:
static _ALWAYS_INLINE_ double round(double p_val) { return (p_val >= 0) ? Math::floor(p_val + 0.5) : -Math::floor(-p_val + 0.5); }
static _ALWAYS_INLINE_ float round(float p_val) { return (p_val >= 0) ? Math::floor(p_val + 0.5) : -Math::floor(-p_val + 0.5); }
- static _ALWAYS_INLINE_ int wrapi(int value, int min, int max) {
- int rng = max - min;
+ static _ALWAYS_INLINE_ int64_t wrapi(int64_t value, int64_t min, int64_t max) {
+ int64_t rng = max - min;
return (rng != 0) ? min + ((((value - min) % rng) + rng) % rng) : min;
}
static _ALWAYS_INLINE_ double wrapf(double value, double min, double max) {