summaryrefslogtreecommitdiff
path: root/core/math/math_funcs.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-03-13 12:33:57 +0100
committerGitHub <noreply@github.com>2018-03-13 12:33:57 +0100
commitb4da44981a855df6cd23a8533b35af262d4801f6 (patch)
tree18dbdabcfc2f88c3cee64d7dae7d76eea2e47219 /core/math/math_funcs.cpp
parentd3e788a6b87979120f571237c68074c844c1b86d (diff)
parent70bb31a7b2cc8da1a3cf2efe4df4fd7b856eaff9 (diff)
Merge pull request #17254 from Chaosus/updatewrap
Update wrap functions
Diffstat (limited to 'core/math/math_funcs.cpp')
-rw-r--r--core/math/math_funcs.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/core/math/math_funcs.cpp b/core/math/math_funcs.cpp
index f060a8e4ab..5c8512d8bd 100644
--- a/core/math/math_funcs.cpp
+++ b/core/math/math_funcs.cpp
@@ -177,18 +177,3 @@ float Math::random(float from, float to) {
float ret = (float)r / (float)RANDOM_MAX;
return (ret) * (to - from) + from;
}
-
-int Math::wrapi(int value, int min, int max) {
- --max;
- int rng = max - min + 1;
- value = ((value - min) % rng);
- if (value < 0)
- return max + 1 + value;
- else
- return min + value;
-}
-
-float Math::wrapf(float value, float min, float max) {
- float rng = max - min;
- return min + (value - min) - (rng * floor((value - min) / rng));
-}