diff options
| author | Chaosus | 2018-03-04 19:16:57 +0300 |
|---|---|---|
| committer | Chaosus | 2018-03-06 10:34:37 +0300 |
| commit | 70bb31a7b2cc8da1a3cf2efe4df4fd7b856eaff9 (patch) | |
| tree | 8b0eab7dbdd6bd43dd7b78444a60ac0038647312 /core/math/math_funcs.cpp | |
| parent | 184b2fe21bbc5fcd3c577ca6d079f6f5f70b7943 (diff) | |
| download | godot-70bb31a7b2cc8da1a3cf2efe4df4fd7b856eaff9.tar.gz godot-70bb31a7b2cc8da1a3cf2efe4df4fd7b856eaff9.tar.zst godot-70bb31a7b2cc8da1a3cf2efe4df4fd7b856eaff9.zip | |
Diffstat (limited to 'core/math/math_funcs.cpp')
| -rw-r--r-- | core/math/math_funcs.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/core/math/math_funcs.cpp b/core/math/math_funcs.cpp index f060a8e4a..5c8512d8b 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)); -} |
