diff options
author | Almighty Laxz <almightylaxz@pm.me> | 2022-09-03 00:24:14 +0930 |
---|---|---|
committer | Almighty Laxz <almightylaxz@pm.me> | 2022-09-03 00:24:14 +0930 |
commit | 2c1593f7e4759123d35ff502be4e462b763d694a (patch) | |
tree | bc187dbe821ea216cc79d2df7732830bb55fee3d /modules/mono/glue | |
parent | 6ccbc2709323c3f77f9509dcf55edad6d46e2a7c (diff) |
Fixed build failing when REAL_T double and dotnet enabled
Diffstat (limited to 'modules/mono/glue')
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs index 33d8aef1a9..3483a04c83 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs @@ -333,14 +333,14 @@ namespace Godot /// <param name="to">The destination color for interpolation.</param> /// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param> /// <returns>The resulting color of the interpolation.</returns> - public Color Lerp(Color to, float weight) + public Color Lerp(Color to, real_t weight) { return new Color ( - Mathf.Lerp(r, to.r, weight), - Mathf.Lerp(g, to.g, weight), - Mathf.Lerp(b, to.b, weight), - Mathf.Lerp(a, to.a, weight) + (float)Mathf.Lerp(r, to.r, weight), + (float)Mathf.Lerp(g, to.g, weight), + (float)Mathf.Lerp(b, to.b, weight), + (float)Mathf.Lerp(a, to.a, weight) ); } @@ -355,10 +355,10 @@ namespace Godot { return new Color ( - Mathf.Lerp(r, to.r, weight.r), - Mathf.Lerp(g, to.g, weight.g), - Mathf.Lerp(b, to.b, weight.b), - Mathf.Lerp(a, to.a, weight.a) + (float)Mathf.Lerp(r, to.r, weight.r), + (float)Mathf.Lerp(g, to.g, weight.g), + (float)Mathf.Lerp(b, to.b, weight.b), + (float)Mathf.Lerp(a, to.a, weight.a) ); } |