summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2021-10-11 19:28:34 -0300
committerGitHub <noreply@github.com>2021-10-11 19:28:34 -0300
commitf9aec342dcd51d65c5970dd395e3c7a66cac446c (patch)
tree9d5b542652e576f865abf0c97a37ee272210ae2e /modules/mono
parent9ed4f8367b29204b89f9feaf86727b24396fb180 (diff)
parent610de0974db4feb7e50c9349a8a164b6bf0f36c8 (diff)
Merge pull request #53687 from godotengine/revert-48332-implement-ping-pong
Revert "Implement reverse playback and ping-pong loop in AnimationPlayer and NodeAnimation"
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs18
1 files changed, 0 insertions, 18 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs
index df0dcdb1bb..6f7fac7429 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs
@@ -693,23 +693,5 @@ namespace Godot
}
return min + ((((value - min) % range) + range) % range);
}
-
- private static real_t Fract(real_t value)
- {
- return value - (real_t)Math.Floor(value);
- }
-
- /// <summary>
- /// Returns the [code]value[/code] wrapped between [code]0[/code] and the [code]length[/code].
- /// If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [code]length[/code] side (like a triangle wave).
- /// If [code]length[/code] is less than zero, it becomes positive.
- /// </summary>
- /// <param name="value">The value to pingpong.</param>
- /// <param name="length">The maximum value of the function.</param>
- /// <returns>The ping-ponged value.</returns>
- public static real_t PingPong(real_t value, real_t length)
- {
- return (length != 0.0) ? Math.Abs(Mathf.Fract((value - length) / (length * 2.0)) * length * 2.0 - length) : 0.0;
- }
}
}