diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-10 07:56:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-10 07:56:15 +0100 |
commit | e317e34c15cc0b2021198d6b53e515b29170c9f6 (patch) | |
tree | 7fca27ddb46cfe52856bc7e79e4dc1ee2a929c64 /modules/mono | |
parent | 284b50cf30a939dfee91876e06895aa50940c37c (diff) | |
parent | 571ea72f35a8531c1e9145bfa25b666b3c276c65 (diff) |
Merge pull request #54825 from TokageItLab/fix-ping-pong-in-math
Fix `PingPong()` in `Mathf.cs` to pass CI/CD for Mono build
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs index df0dcdb1bb..fbc8ff64a6 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs @@ -709,7 +709,7 @@ namespace Godot /// <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; + return (length != (real_t)0.0) ? Abs(Fract((value - length) / (length * (real_t)2.0)) * length * (real_t)2.0 - length) : (real_t)0.0; } } } |